Windows Access Bridge from C# (WindowsAccessBridge.dll)
Hello-
Does anyone have sample code for how to call into WindowsAccessBridge.dll from C#? I'm able to build, run, and debug through the Ferret and Monkey samples from Visual Studio .NET 2005, but that's native C code.
I think I've distilled it down to the minimal set of lines required to get started, which I've pasted below, but no calls to "isJavaWindow" will return "true". I've verified the window handle I'm passing in two ways: via Spy++, and by stepping through the Monkey project (it finds the window correctly).
So am I missing an initialization step? Does anyone have working C# code that wraps the Windows Access Bridge?
Greatly appreciated. My code follows. Just create a new C# console app and replace the default Program.cs with this to see it go. Or not.
using System;
using System.Runtime.InteropServices;
namespace WABTest
class Program
[STAThread]
static void Main(string[] args)
DoWABTest();
[DllImport("kernel32.dll")]
private static extern IntPtr LoadLibrary(string lpFileName);
[DllImport("WindowsAccessBridge", CallingConvention = CallingConvention.Cdecl)]
private extern static void Windows_run();
[DllImport("WindowsAccessBridge", CallingConvention = CallingConvention.Cdecl)]
private extern static bool isJavaWindow(IntPtr window);
static void DoWABTest()
IntPtr _bridgeInstance = LoadLibrary("WindowsAccessBridge");
Windows_run();
bool ijw = isJavaWindow(new IntPtr(0x0006050A));
}
Hello-
Does anyone have sample code for how to call into WindowsAccessBridge.dll from C#? I'm able to build, run, and debug through the Ferret and Monkey samples from Visual Studio .NET 2005, but that's native C code.
I think I've distilled it down to the minimal set of lines required to get started, which I've pasted below, but no calls to "isJavaWindow" will return "true". I've verified the window handle I'm passing in two ways: via Spy++, and by stepping through the Monkey project (it finds the window correctly).
So am I missing an initialization step? Does anyone have working C# code that wraps the Windows Access Bridge?
Greatly appreciated. My code follows. Just create a new C# console app and replace the default Program.cs with this to see it go. Or not.
using System;
using System.Runtime.InteropServices;
namespace WABTest
class Program
[STAThread]
static void Main(string[] args)
DoWABTest();
[DllImport("kernel32.dll")]
private static extern IntPtr LoadLibrary(string lpFileName);
[DllImport("WindowsAccessBridge", CallingConvention = CallingConvention.Cdecl)]
private extern static void Windows_run();
[DllImport("WindowsAccessBridge", CallingConvention = CallingConvention.Cdecl)]
private extern static bool isJavaWindow(IntPtr window);
static void DoWABTest()
IntPtr _bridgeInstance = LoadLibrary("WindowsAccessBridge");
Windows_run();
bool ijw = isJavaWindow(new IntPtr(0x0006050A));
}
Similar Messages
-
In Windows Access Bridge 1.2, GetAccessibleChild doens't list "Layer Panel"
In Windows Access Bridge 1.2, GetAccessibleChild() doens't list "Layered Panel" as a child while GetAccessibleParent() can access "Layered Panel" object.
Anyone knows whether it's the problem of Access Bridge or mine?
ThanksThank you David__B! Your suggestion worked perfectly. All the files are correctly associated in both Explorer and Bridge. And it didn't take all that long, mostly uninstalling. The Adobe App Manager very efficiently installs several different programs with very little fuss.
I am not sure, but I think it may have been an old plug-in to Bridge back in the CS4 era that I didn't even know I had that was causing the Bridge file association problems. Uninstalling CS5 after installing CS6 seems to be causing Win Explorer problems, not just for me. Based on this experience, I would recommend that anyone with several previous installations of Adobe CS do the following:
Save your plugins and preference files in a back up file.
Uninstall all the old adobe software.
Run the the cleaner you suggested. (http://www.adobe.com/support/contact/cscleanertool.html).
Install CS6 programs from the CCloud or wherever.
Add your plug-ins back in as you need them one at a time to be sure they work.
If you have already installed CS6 and are having file association problems, just uninstall everything and start at step one. You probably won't save time trying to fix the registry and manually associate file types--- yada yada yada.
Steps 1-6 will give you a nice clean install and salvage only good plug-ins.
Beth -
Problem Accessing Bridge from Photoshop
I am running Photoshop CC 1024 and Bridge CC (Version 6.1.0.116 x64) on OS Win7 Ult.
When I click "File/Browse in Adobe Bridge" in Photoshop I keep getting a Creative Cloud dialog asking "Are you sure you want to install this version of Bridge?".
Since I believe that I am running the latest version of Bridge, I answer No. Instead of the Bridge app, I get the Creative Cloud dialog.
Is there some setting in Ps that I have missed?
Thanks in advance
PaulI running Windows 7 Pro have the following creative cloud apps installed.
Using Photoshop CC 2014 the use what menu Help>System Info... shows.
Adobe Photoshop Version: 2014.0.0 20140508.r.58 2014/05/08:23:59:59 x64
Operating System: Windows 7 64-bit
Version: 6.1 Service Pack 1
System architecture: Intel CPU Family:6, Model:13, Stepping:7 with MMX, SSE Integer, SSE FP, SSE2, SSE3, SSE4.1, SSE4.2, HyperThreading
Physical processor count: 12
Logical processor count: 24
Processor speed: 1995 MHz
Built-in memory: 40886 MB
Free memory: 34782 MB
Memory available to Photoshop: 37132 MB
Memory used by Photoshop: 70 %
3D Multitone Printing: Disabled.
Touch Gestures: Disabled.
Windows 2x UI: Disabled.
Image tile size: 1024K
Image cache levels: 4
Font Preview: Huge
TextComposer: Latin
Display: 1
Display Bounds: top=0, left=0, bottom=1080, right=1920
Display: 2
Display Bounds: top=0, left=-1360, bottom=768, right=0
OpenGL Drawing: Enabled.
OpenGL Allow Old GPUs: Not Detected.
OpenGL Drawing Mode: Advanced
OpenGL Allow Normal Mode: True.
OpenGL Allow Advanced Mode: True.
AIFCoreInitialized=1
AIFOGLInitialized=1
OGLContextCreated=1
glgpu[0].GLVersion="3.0"
glgpu[0].GLMemoryMB=2048
glgpu[0].GLName="Quadro 4000/PCIe/SSE2"
glgpu[0].GLVendor="NVIDIA Corporation"
glgpu[0].GLVendorID=4318
glgpu[0].GLDriverVersion="9.18.13.3311"
glgpu[0].GLRectTextureSize=16384
glgpu[0].GLRenderer="Quadro 4000/PCIe/SSE2"
glgpu[0].GLRendererID=1757
glgpu[0].HasGLNPOTSupport=1
glgpu[0].GLDriver="nvd3dumx.dll,nvwgf2umx.dll,nvwgf2umx.dll,nvd3dum,nvwgf2um,nvwgf2um"
glgpu[0].GLDriverDate="20140429000000.000000-000"
glgpu[0].CanCompileProgramGLSL=1
glgpu[0].GLFrameBufferOK=1
glgpu[0].glGetString[GL_SHADING_LANGUAGE_VERSION]="4.40 NVIDIA via Cg compiler"
glgpu[0].glGetProgramivARB[GL_FRAGMENT_PROGRAM_ARB][GL_MAX_PROGRAM_INSTRUCTIONS_ARB]=[6553 6]
glgpu[0].glGetIntegerv[GL_MAX_TEXTURE_UNITS]=[4]
glgpu[0].glGetIntegerv[GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS]=[192]
glgpu[0].glGetIntegerv[GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS]=[32]
glgpu[0].glGetIntegerv[GL_MAX_TEXTURE_IMAGE_UNITS]=[32]
glgpu[0].glGetIntegerv[GL_MAX_DRAW_BUFFERS]=[8]
glgpu[0].glGetIntegerv[GL_MAX_VERTEX_UNIFORM_COMPONENTS]=[4096]
glgpu[0].glGetIntegerv[GL_MAX_FRAGMENT_UNIFORM_COMPONENTS]=[2048]
glgpu[0].glGetIntegerv[GL_MAX_VARYING_FLOATS]=[124]
glgpu[0].glGetIntegerv[GL_MAX_VERTEX_ATTRIBS]=[16]
glgpu[0].extension[AIF::OGL::GL_ARB_VERTEX_PROGRAM]=1
glgpu[0].extension[AIF::OGL::GL_ARB_FRAGMENT_PROGRAM]=1
glgpu[0].extension[AIF::OGL::GL_ARB_VERTEX_SHADER]=1
glgpu[0].extension[AIF::OGL::GL_ARB_FRAGMENT_SHADER]=1
glgpu[0].extension[AIF::OGL::GL_EXT_FRAMEBUFFER_OBJECT]=1
glgpu[0].extension[AIF::OGL::GL_ARB_TEXTURE_RECTANGLE]=1
glgpu[0].extension[AIF::OGL::GL_ARB_TEXTURE_FLOAT]=1
glgpu[0].extension[AIF::OGL::GL_ARB_OCCLUSION_QUERY]=1
glgpu[0].extension[AIF::OGL::GL_ARB_VERTEX_BUFFER_OBJECT]=1
glgpu[0].extension[AIF::OGL::GL_ARB_SHADER_TEXTURE_LOD]=1
clgpu[0].CLPlatformVersion="1.1"
clgpu[0].CLDeviceVersion="1.1 CUDA"
clgpu[0].CLMemoryMB=2048
clgpu[0].CLName="Quadro 4000"
clgpu[0].CLVendor="NVIDIA Corporation"
clgpu[0].CLVendorID=4318
clgpu[0].CLDriverVersion="333.11"
clgpu[0].CUDASupported=1
clgpu[0].CUDAVersion="6.0.1"
clgpu[0].CLBandwidth=7.49283e+010
clgpu[0].CLCompute=184.879
License Type: Subscription
Serial number: 96040035116912554961
Application folder: C:\Program Files\Adobe\Adobe Photoshop CC 2014\
Temporary file path: C:\Users\JOHNJM~1\AppData\Local\Temp\
Photoshop scratch has async I/O enabled
Scratch volume(s):
F:\, 465.2G, 170.5G free
C:\, 224.2G, 106.1G free
Required Plug-ins folder: C:\Program Files\Adobe\Adobe Photoshop CC 2014\Required\Plug-Ins\
Primary Plug-ins folder: C:\Program Files\Adobe\Adobe Photoshop CC 2014\Plug-ins\
Installed components:
A3DLIBS.dll A3DLIB Dynamic Link Library 9.2.0.112
ACE.dll ACE 2014/04/14-23:42:44 79.554120 79.554120
adbeape.dll Adobe APE 2013/02/04-09:52:32 0.1160850 0.1160850
AdbePM.dll PatchMatch 2014/04/23-10:46:55 79.554276 79.554276
AdobeLinguistic.dll Adobe Linguisitc Library 8.0.0
AdobeOwl.dll Adobe Owl 2014/03/05-14:49:37 5.0.33 79.552883
AdobePDFL.dll PDFL 2014/03/04-00:39:42 79.510482 79.510482
AdobePIP.dll Adobe Product Improvement Program 7.2.1.3399
AdobeXMP.dll Adobe XMP Core 2014/01/13-19:44:00 79.155772 79.155772
AdobeXMPFiles.dll Adobe XMP Files 2014/01/13-19:44:00 79.155772 79.155772
AdobeXMPScript.dll Adobe XMP Script 2014/01/13-19:44:00 79.155772 79.155772
adobe_caps.dll Adobe CAPS 8,0,0,7
AGM.dll AGM 2014/04/14-23:42:44 79.554120 79.554120
ahclient.dll AdobeHelp Dynamic Link Library 1,8,0,31
amtlib.dll AMTLib (64 Bit) 8.0.0.45 BuildVersion: 8.0; BuildDate: Fri Mar 28 2014 20:28:30) 1.000000
ARE.dll ARE 2014/04/14-23:42:44 79.554120 79.554120
AXE8SharedExpat.dll AXE8SharedExpat 2013/12/20-21:40:29 79.551013 79.551013
AXEDOMCore.dll AXEDOMCore 2013/12/20-21:40:29 79.551013 79.551013
Bib.dll BIB 2014/04/14-23:42:44 79.554120 79.554120
BIBUtils.dll BIBUtils 2014/04/14-23:42:44 79.554120 79.554120
boost_date_time.dll photoshopdva 8.0.0
boost_signals.dll photoshopdva 8.0.0
boost_system.dll photoshopdva 8.0.0
boost_threads.dll photoshopdva 8.0.0
cg.dll NVIDIA Cg Runtime 3.0.00007
cgGL.dll NVIDIA Cg Runtime 3.0.00007
CIT.dll Adobe CIT 2.2.6.32411 2.2.6.32411
CITThreading.dll Adobe CITThreading 2.2.6.32411 2.2.6.32411
CoolType.dll CoolType 2014/04/14-23:42:44 79.554120 79.554120
dvaaudiodevice.dll photoshopdva 8.0.0
dvacore.dll photoshopdva 8.0.0
dvamarshal.dll photoshopdva 8.0.0
dvamediatypes.dll photoshopdva 8.0.0
dvametadata.dll photoshopdva 8.0.0
dvametadataapi.dll photoshopdva 8.0.0
dvametadataui.dll photoshopdva 8.0.0
dvaplayer.dll photoshopdva 8.0.0
dvatransport.dll photoshopdva 8.0.0
dvaui.dll photoshopdva 8.0.0
dvaunittesting.dll photoshopdva 8.0.0
dynamiclink.dll photoshopdva 8.0.0
ExtendScript.dll ExtendScript 2014/01/21-23:58:55 79.551519 79.551519
icucnv40.dll International Components for Unicode 2013/02/25-15:59:15 Build gtlib_4.0.19090
icudt40.dll International Components for Unicode 2013/02/25-15:59:15 Build gtlib_4.0.19090
imslib.dll IMSLib DLL 7.0.0.145
JP2KLib.dll JP2KLib 2014/03/12-08:53:44 79.252744 79.252744
libifcoremd.dll Intel(r) Visual Fortran Compiler 10.0 (Update A)
libiomp5md.dll Intel(R) OpenMP* Runtime Library 5.0
libmmd.dll Intel(r) C Compiler, Intel(r) C++ Compiler, Intel(r) Fortran Compiler 12.0
LogSession.dll LogSession 7.2.1.3399
mediacoreif.dll photoshopdva 8.0.0
MPS.dll MPS 2014/03/25-23:41:34 79.553444 79.553444
pdfsettings.dll Adobe PDFSettings 1.04
Photoshop.dll Adobe Photoshop CC 2014 15.0
Plugin.dll Adobe Photoshop CC 2014 15.0
PlugPlugExternalObject.dll Adobe(R) CEP PlugPlugExternalObject Standard Dll (64 bit) 5.0.0
PlugPlugOwl.dll Adobe(R) CSXS PlugPlugOwl Standard Dll (64 bit) 5.0.0.74
PSArt.dll Adobe Photoshop CC 2014 15.0
PSViews.dll Adobe Photoshop CC 2014 15.0
SCCore.dll ScCore 2014/01/21-23:58:55 79.551519 79.551519
ScriptUIFlex.dll ScriptUIFlex 2014/01/20-22:42:05 79.550992 79.550992
svml_dispmd.dll Intel(r) C Compiler, Intel(r) C++ Compiler, Intel(r) Fortran Compiler 12.0
tbb.dll Intel(R) Threading Building Blocks for Windows 4, 2, 2013, 1114
tbbmalloc.dll Intel(R) Threading Building Blocks for Windows 4, 2, 2013, 1114
TfFontMgr.dll FontMgr 9.3.0.113
TfKernel.dll Kernel 9.3.0.113
TFKGEOM.dll Kernel Geom 9.3.0.113
TFUGEOM.dll Adobe, UGeom© 9.3.0.113
updaternotifications.dll Adobe Updater Notifications Library 7.0.1.102 (BuildVersion: 1.0; BuildDate: BUILDDATETIME) 7.0.1.102
VulcanControl.dll Vulcan Application Control Library 5.0.0.82
VulcanMessage5.dll Vulcan Message Library 5.0.0.82
WRServices.dll WRServices Fri Mar 07 2014 15:33:10 Build 0.20204 0.20204
wu3d.dll U3D Writer 9.3.0.113
Required plug-ins:
3D Studio 15.0 (2014.0.0 x001)
Accented Edges 15.0
Adaptive Wide Angle 15.0
Angled Strokes 15.0
Average 15.0 (2014.0.0 x001)
Bas Relief 15.0
BMP 15.0
Camera Raw 8.5
Camera Raw Filter 8.5
Chalk & Charcoal 15.0
Charcoal 15.0
Chrome 15.0
Cineon 15.0 (2014.0.0 x001)
Clouds 15.0 (2014.0.0 x001)
Collada 15.0 (2014.0.0 x001)
Color Halftone 15.0
Colored Pencil 15.0
CompuServe GIF 15.0
Conté Crayon 15.0
Craquelure 15.0
Crop and Straighten Photos 15.0 (2014.0.0 x001)
Crop and Straighten Photos Filter 15.0
Crosshatch 15.0
Crystallize 15.0
Cutout 15.0
Dark Strokes 15.0
De-Interlace 15.0
Dicom 15.0
Difference Clouds 15.0 (2014.0.0 x001)
Diffuse Glow 15.0
Displace 15.0
Dry Brush 15.0
Eazel Acquire 15.0 (2014.0.0 x001)
Embed Watermark 4.0
Entropy 15.0 (2014.0.0 x001)
Export Color Lookup NO VERSION
Extrude 15.0
FastCore Routines 15.0 (2014.0.0 x001)
Fibers 15.0
Film Grain 15.0
Filter Gallery 15.0
Flash 3D 15.0 (2014.0.0 x001)
Fresco 15.0
Glass 15.0
Glowing Edges 15.0
Google Earth 4 15.0 (2014.0.0 x001)
Grain 15.0
Graphic Pen 15.0
Halftone Pattern 15.0
HDRMergeUI 15.0
IFF Format 15.0
Ink Outlines 15.0
JPEG 2000 15.0
Kurtosis 15.0 (2014.0.0 x001)
Lens Blur 15.0
Lens Correction 15.0
Lens Flare 15.0
Liquify 15.0
Matlab Operation 15.0 (2014.0.0 x001)
Maximum 15.0 (2014.0.0 x001)
Mean 15.0 (2014.0.0 x001)
Measurement Core 15.0 (2014.0.0 x001)
Median 15.0 (2014.0.0 x001)
Mezzotint 15.0
Minimum 15.0 (2014.0.0 x001)
MMXCore Routines 15.0 (2014.0.0 x001)
Mosaic Tiles 15.0
Multiprocessor Support 15.0 (2014.0.0 x001)
Neon Glow 15.0
Note Paper 15.0
NTSC Colors 15.0 (2014.0.0 x001)
Ocean Ripple 15.0
OpenEXR 15.0
Paint Daubs 15.0
Palette Knife 15.0
Patchwork 15.0
Paths to Illustrator 15.0
PCX 15.0 (2014.0.0 x001)
Photocopy 15.0
Photoshop 3D Engine 15.0 (2014.0.0 x001)
Photoshop Touch 14.0
Picture Package Filter 15.0 (2014.0.0 x001)
Pinch 15.0
Pixar 15.0 (2014.0.0 x001)
Plaster 15.0
Plastic Wrap 15.0
PNG 15.0
Pointillize 15.0
Polar Coordinates 15.0
Portable Bit Map 15.0 (2014.0.0 x001)
Poster Edges 15.0
Radial Blur 15.0
Radiance 15.0 (2014.0.0 x001)
Range 15.0 (2014.0.0 x001)
Read Watermark 4.0
Render Color Lookup Grid NO VERSION
Reticulation 15.0
Ripple 15.0
Rough Pastels 15.0
Save for Web 15.0
ScriptingSupport 15.0
Shake Reduction 15.0
Shear 15.0
Skewness 15.0 (2014.0.0 x001)
Smart Blur 15.0
Smudge Stick 15.0
Solarize 15.0 (2014.0.0 x001)
Spatter 15.0
Spherize 15.0
Sponge 15.0
Sprayed Strokes 15.0
Stained Glass 15.0
Stamp 15.0
Standard Deviation 15.0 (2014.0.0 x001)
STL 15.0 (2014.0.0 x001)
Sumi-e 15.0
Summation 15.0 (2014.0.0 x001)
Targa 15.0
Texturizer 15.0
Tiles 15.0
Torn Edges 15.0
Twirl 15.0
Underpainting 15.0
Vanishing Point 15.0
Variance 15.0 (2014.0.0 x001)
Water Paper 15.0
Watercolor 15.0
Wave 15.0
Wavefront|OBJ 15.0 (2014.0.0 x001)
WIA Support 15.0 (2014.0.0 x001)
Wind 15.0
Wireless Bitmap 15.0 (2014.0.0 x001)
ZigZag 15.0
Optional and third party plug-ins:
CUR (Windows Cursor) NO VERSION
GREYCstoration NO VERSION
ICO (Windows Icon) NO VERSION
Reduce Noise 7.0.0.0
ScriptListener 13.0
StarFilter Pro 3 3.0.3.0
SuperPNG 2.0
Plug-ins that failed to load: NONE
Flash:
Adobe Kuler
Installed TWAIN devices: NONE
Here is a couple of screen captures. View them in a new tab or window for thissite scales screen captured poorly. In a tab you should be able to view actual pixels when you scale up the image. -
I just installed CS6 upgrade. I always started Bridge from CS5 meu bar at the top. There is no Bridge button/icon to start Bridge from the top menu. I have to access it through the file menu. Is there a problem or am I missing an option or preference setting? In CS4 & 5 it was always on the top menu bar????
Any help would be greatly appreciated
TimCurt,
Thanks for your reply. There was a problem with the upgrade install and some items not being installed. Mini Bridge and a few other components were not installed. The program would run but wtih no Bridge or Mini Bridge icon.
I used Adobe Chat and they finally figured it out. A permission setting was not correct, so after getting that sorted out, we reinstalled and it finished correctly and I found the Bridge Icons. I do wish I could put it back where I was used to using it, but I guess that is progress. Or Just want to keep up guessing.
So there was a problem but now it seems to work fine.
Thanks again for your reply.
Tim -
Hi there.
I have been working on a test system which will potentially have TestStand at its core, and downloaded/installed the 4.2.1 evaluation. Current details from the information dialog are:
TestStand Engine version 4.2.1 (4.2.1.83)
Sequence Editor Verison 4.2.1.83
The system will drive mobile radio devices using RS232 serial interfaces, usnig a variety of serial protocols (Hayes, and a couple of proprietary binary protocols for other work).
We already have in existence a soak tester, written in VS2005 with MFC unmanaged DLLs and also managed DLLs, which are mixed up together to provide different aspects of the functionality required for the binary protocols.
I have created:
1. a "master wrapper" DLL for the constellation of other DLLs - this offers up a simple C-API interface which I hope TestStand will use. It's called "SerialSessionMgr.dll""
2. a mixed managed / unmanaged "IJW" (it just works) DLL which wraps up the binary logging protocol control interfaces, which are entirely in managed C++/CLI: the "master wrapper" DLL calls into this through an unmanaged interface to create instances of the CLI-compiled class which interfaces to the underlying managed DLLs imlpementing the logging protocol. This is called "WinTseInterface.dll".
Before I started evaluating TestStand, I knocked up a test harness using CPPUnit / MFC, with which I was able to test SerialSessionMgr.dll and its' use of WinTseInterface.dll and verify they worked. The harness loads the DLL dynamically at run-time using AfxLoadLibrary() to try to emulate the way TestStand uses it.
When we open a
TSE session:
The SerialSessionManager makes a call to the
WinTseInterface.dll to "create" a logging instance. The instance is
created in a std::map which is held by the CWinApp derived class, this map
contains boost::shared_ptr of the class which works with a managed class. So we
have a call trace: Client
app->SerialSessionManager{TseStartSession()}->WinTseInterface{WINTSE_GetWinTseBridge()} - WINTSE_GetWinTseBridge()
just creates a new instance of the unmanaged class which interfaces through to
the managed CLI/C++ class beneath, and returns the address to the
SerialSessionManager, which stores it.
The SerialSessioManager actually initialises the WinTseBridge using a method of a C++ pure virtual interface class to the class in the std::map in the WinTseInterface DLL
implements. The initialise call passes miscellaneous details and actually calls
"gcnew" to create the managed class which interfaces to the
underlying managed DLLs which implement the logging protocol.
My logs of the DLL loading as seen in VS2005 debug output are attached this message as PDFs
While trying to fix this, I have tried:
Enhancing the WinTseInterface DLL so it manually loads all the other assemblies in the logging system, including the managed portion of WinTseInterface itself (no effect)
All the different options for the way the C DLL adapter loads and unloads the DLL in the DLL adapter steptype in TestStand
I've even tried calling directly into the WinTseInterface DLL before trying any SerialSessionManager DLL calls to try to load the WinTseInterface DLL completely beforehand
and I cannot stop this exception.
It seems like the object is created in the WinTseInterface DLL OK (I have debugged the creation step which runs for WINTSE_GetWinTseBridge() and the object is created OK) when the SerialSessionManager makes the call, but when it calls the first managed function, which creates the managed object, the DLL is reloaded as managed - I suspect this causes the object to be destroyed or overwritten, and thus the call to initialise bombs with null pointer violation.
Have I done something obviously wrong, and what other approaches can I take?
Does TestStand 4.2.1 have issues with driving DLLs which use managed/unmanaged DLLs beneath them?
My nuclear option is to throw the WinTseInterface DLL out completely and wrap up the managed C++ CLI code in a new interface, entirely managed, and use the TestStand ".Net" adaptor to drive that, creating my step library to run to that directly. This isn't ideal as I have some co-ordination of the protocols which is implemented in the SerialSessionMgr DLL.
I hope someone can help. This one's low level, dirty and a stumper to me.
Many thanks to the NI community. This is my first posting!
Solved!
Go to Solution.
Attachments:
CPPUnit Test Harness DLL load debug output.pdf 18 KB
TestStand DLL load & crash debug output.pdf 43 KBHi there Ray.
First - many thanks for engaging with this thorny problem. Love the avatar BTW.
I've been using the C/C++ DLL adapter: the original premise of the Serial Session Manager DLL was to provide a simple C type functional interface, using simple data types, so that TestStand would be able to drive the underlying functionality easily through a single DLL.
Seeing as you've been kind enough to respond, I should explain the makeup of the DLLs a little more, I think.
The SerialSessionManager (SSMgr) DLL uses C++ and MFC internally. This is the DLL which TestStand calls into directly through the C/C++ adapter. This DLL does have one odd feature though - because the it uses the Windows Multimedia Timer (implemented in WinMM.dll) I had to artificially create a scenario where it would load the .Net mscoree DLL _before_ it loads WinMM.dll - (http://connect.microsoft.com/VisualStudio/feedback/details/329819/freelibrary-in-the-winmm-dlls-modu...), basically WinMM.dll's init code gets rather upset when .Net DLLs load, which causes the entire executable to be unloaded with subsequent crashes.
To work around this crash, the SSMgr has a single, completely empty, file which is compiled for CLR, effectively forcing a dependency into the DLL on the .Net subsystems and turning the DLL into a "IJW" binary. The resulting DLL doesn't actually have any executable managed .Net assemblies, but I'm guessing that it does contain enough .Net related stubs and information that when the DLL is loaded, mscoree.dll loads before WinMM.dll - and this means the system doesn't crash.
Now, on to the WinTseInterface DLL. My initial description of this little software system was done in something of a hurry.
This DLL is the C++/CLI "IJW" DLL which actually contains managed and unmanaged code. Underneath the WinTseInterface DLL is another system of (this time exclusively C++/CLI) DLL assemblies which implement the TSE protocol interpretation system.
When the SSMgr DLL needs to start a TSE protocol session, it calls a C-API function in the WinTseInterface which creates a new CWinTseBridge class. Here's the steps in a little more detail:
SSMgr DLL calls WINTSE_GetWinTseBridge(), passing in the name of the device which needs it (this is used to put the new WinTseBridge into a std::map in the WinTseInterface DLL) - this call runs just fine, and returns the address of the CWinTseBridge C++ object. This is stored in the SSMgr, because the CWinTseBridge class implements a pure virtual interface which is used by the SSMgr as a way of accessing the CWinTseBridge methods.
We now use the address from (1) to make a call to CWinTseBridge::Initialise(), passing some basic configuration details.
I've run VS2005 debug on the Sequence Editor when running the test, and done F11 step-throughs of the code loading each parameter in the Initialise() call onto the stack, and what appears to happen is that when the call is made, the whole lot steps off into oblivion (a reference to 0x00000000 is made, I think).
Do you think it's worth trying to get this approach to work? It would be useful to retain the control surface in the top of the SSMgr as there is co-ordination of the protocols within the logic of that component. If I move the Wintse control out into a separate managed DLL I may not have that co-ordination (this might be overcome with some design, as I've confirmed that it is possible to "reach into" the WinTseInterface DLL with TestStand and create and use managed objects from assemblies contained within).
Are there any known issues with this version of TestStand using C/C++ CLI IJW DLLs? I haven't found much out there on the web.
Attachments:
Tse_Test.seq 7 KB -
Accessing objects from an existing JVM on Windows
I have a Java class that is running in an existing JVM which is running on local windows workstation. Is there a way I can access any methods or objects from the running Java class and other objects running inside the JVM from C or C++ code using Invocation API?. I know there is a way for us to ATTACH to a JVM that was created from C/C++ but I am looking for a way to access objects from a JVM that was started either as a service or started by other means.
How did you start the C++ code?
It is possible to load the c++ dll within your Java code then you may access the c++ code by using native methods out of Java. By calling the c++ method you have the pointer to your Java object and my use it (=> don't forget to use global references).
If you have started both seperatly C++ in an extra process and Java in an extra process then it can be complicated. Guess that there aren't any easy solution.
This mean: either you have your Java code loading a dll or you have C++ creating a JVM... -
Java accessibility Bridge for windows
I have installed Java Accessibility Bridge for windows but the screen reader in windows (Narrator) is not responding to my java application. On searching the internet, most of them mentioned about JAWS. So is it the only screen reader supporting Java Accessibility Bridge? Also is there any way to use it with Narrator?
Thanks in advance
leemanNarrator doesn't use the Java Access Bridge so it will not work with Java. Recommend you use another screen reader. Yes, many people do use JAWS, but I also know SuperNova (from Dolphin) and NVDA also work.
-
Java Access Bridge and Windows 7 Run as Administrator Mode
I've had to add java access bridge support to a winforms .net application. The application must be run as administrator for certain functions to work on Windows 7. Unfortunately, I've found the JAB breaks when it's run from a program that has been elevated to administrator.
I'm able to reproduce the issue with JavaFerret.exe. Running with a simple double click has no issue tracking mouse events etc, but if I start it via right click "run as administrator" then nothing gets presented in the output window. Can others confirm JavaFeret.exe breaks for them as well in Windows 7 admin mode? Any ideas what's going on and how to work around the issue?So after a bit of experimenting we've found that as long as the accessibility program that's hosting the JAB and the java program that is being interacted with are both run in administrator mode then the issue goes away.
In our case we were able to launch IE from the accessibility program (which was already in administrator mode), opening the java applet in IE and successfully use the JAB between the two. -
How can I access files from a flash drive that were previously saved using a Windows computer? When I attempt to open the file on MacBook Pro, it is asking to "convert file to"; none of the options I choose work. I also have Microsoft Office (with Word) installed on the Mac as well.
Format the external drive as FAT32 or ExFAT. Both computers will then be able to read and write to it.
-
Dear All,
We are having an infrastructure setup of around 500 client computers managed through group policy.
Recently the domain controllers have been migrated from Windows Server 2003 to Server 2008 R2.
Since this account requires extremely strict environment, we need to figure the solution for restricting the users from access anything locally.
It would be great if you can assist me with the following query.
How to restrict users logged on Windows 7 clients from accessing Windows Explorer and browsing other systems in the network through Group Policy with a domain controller running on Windows Server 2008 r2 ?
Can we disable Network Tab on the left hand pane ?
explorer.exe is blocked already, but users are able to enter the Windows Explorer by clicking on the name which is visible on the Start Menu.> * explorer.exe is blocked already, but users are able to enter the
> Windows Explorer by clicking on the name which is visible on the
> Start Menu.
You cannot block explorer.exe when you do not replace the shell - the
desktop you see effectively IS explorer.exe...
Your requirement sounds like you need a custom shell:
http://gpsearch.azurewebsites.net/#2812
Martin
Mal ein
GUTES Buch über GPOs lesen?
NO THEY ARE NOT EVIL, if you know what you are doing:
Good or bad GPOs?
And if IT bothers me - coke bottle design refreshment :)) -
How to access and control a Windows 7 computer from a Mac - long distance?
I bought my parents their very first computer. They are 2000 miles away in another state. Currently I have the computer in my possession to "set-up" everything so it is as seamless as possible when they receive it.
It is an HP with Windows 7. I have a mac. I would like to remotely access their Windows machine to help them when they need it - to be able to control theirs to show them how to do things and to do it for them if need be.
Thank you for your time
Pattie
This is a new thread. If you want to see the original info it is at this link:
http://discussions.apple.com/message.jspa?messageID=12832917#12832917You are only as secure as web browsing to the LogMeIn website is (which appears to use HTTPS). If your login on that site is compromised, they will have a list of your computers that they can attempt to connect to. As long as you don't save the login credentials, they would then also need to know what username and password to use to connect to the computer. Granted, a little social engineering, and they could probably get some good ideas what to try for those, but if you chose to make your computers secure with complex and hard to guess passwords then it should be fine.
I've been using LogMeIn from my Mac to my mom's Windows XP system from July 2009, and to my wife's Thinkpad running Win 7 since Oct 2009. None of the computers involved have had any security issues at all, let alone any caused by LogMeIn. For my wife's PC, it sits behind our NAT Firewall in our LinkSys Router (although I did have it behind a CheckPoint VPN Edge router for a while). My Mom's PC sits behind a Netgear Router providing its NAT Firewall. When my Mac isn't at home, it's generally behind that CheckPoint VPN router at my office now. It all works nicely from behind one router to behind another. The Piece that you install on the PC will log it into the LogMeIN website and that is how it gets through the router to the PC. You login to the website, select the PC to control, then login to that PC. -
Unable to access files on Windows 7 computer from Windows 8.1 computer
I have a Windows 7 desktop and a Windows 8.1 laptop. Both connect wirelessly to the internet via my Home Hub. Because the desktop is my main repository of documents / pictures etc. I want to be able to access them from the laptop, but despite
spending ages surfing for assistance I can't manage to do this.
At this stage I'll cheerfully confess to being semi-PC-illiterate and totally confused about Network File Sharing, Homegroups and Workgroups!
One fundamental problem seems to be this - I can ping the laptop from the desktop but not vice-versa. That said, if I run Explorer on the desktop and click on Network, it displays both machines (and the hub). If I run Explorer on the laptop and
click on Network, it displays the laptop and the hub, but
not the desktop.
I'd be grateful if some kind reader could patiently suggest how I could diagnose and fix the problem!
Many thanks in anticipation.Hi,
We haven't heard from you for several days, Would you mind letting me know the result of the suggestions? If you need further assistance, feel free to let me know. I will be more than happy to be of assistance.
Please understand that Network discovery is a network setting that affects whether your computer can find other computers and devices on the network and whether other computers on the network can find your computer.
Please configure this settings to check this issue.
For your reference:
What is network discovery?
http://windows.microsoft.com/en-hk/windows/what-is-network-discovery#1TC=windows-7
We will wait for other several days and if there is no response, we consider that the issue is resolved and will mark as answered.
Kate Li
TechNet Community Support -
I have Photoshop CS5, and use windows XP. I cannot open bridge from photoshop, which I have done for years. When I am in Photoshop, when it opens, I always click on the bridge icon at the bottom of the screen and it puts me into bridge. This is not happening, the small wheel at the bottom of the screen just keeps spinning. Its like its stuck or caught in a loop. I can't get into bridge. I tried shutting down and starting up again but the problem remains. Looking for help. Dan
Thanks for your response, I was able to open bridge from File-Browse in Bridge. This worked, but was not able to go back to the way I always opened Bridge. At least I could get to Bridge and go into Camera Raw. I never tried to open Bridge from the Start menu. The odd thing about this is, it has happened before, and to get it "unstuck" and working again, I would shut down and restart again in a few minutes, and things would go back to normal. This time it did not go back to normal after several attempts. I shut down for about 3-4 hours, restarted, and it seems to be back to normal again. I am not sure if it's a problem that is getting worse each time it happens. And yes I am using Mini Bridge in photoshop CS5. Thank you for your help. Dan
-
I am trying to access photoshop from the bridge tool menu so i can go to, load files into photoshop layers. I don't have photoshop listed under menu, just illustrator.
<moved from Adobe Creative Cloud to Bridge General Discussion>
-
I have Adobe Photoshop CS4 and have just upgraded my Mac operating system to Yosemite with the newest version of Java 2014 running. When I try to access Photoshop from Bridge or directly open it asks for a Legacy Version of Java 6. As I am a pensioner I cannot afford an upgrade does anyone know of a work-around for this problem?
Hi Daddyfred,
CS4 Photoshop has not been tested on Yosemite. But still you can try the Java 6 update using the below link.
http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase6-419 409.html
Thank you for posting on Adobe Forums.
Maybe you are looking for
-
Recently purchased a laptop, came with windows 7 64bit, downloaded itunes and tried to sync both the 3gs and Ipod touch, itunes doesn't recognize either. The computer doesn't show the devices on the device manager but I am able to charge them bot
-
Passing result list from Contact search to Target group
Hi, I have to pass the result list of Contact serch(BP_CONT_SEARCH) to Target group creation component(SEGED_TG). Can you give me the steps that I need to follow. Note: Here the contact structure is different in each component. Thanks.
-
With holding tax decuction from T.Code F-02 with out sp. gl indicator
Hi All, While making the payt to service vendor my client do not want to use the functionality of advance payt, which can be performed through T.code F-48. They wants to treat this advance payt as a normal payt to vendor but they want to deduct the w
-
PDF issue with iBooks, iPad in iOS 5
Is there anyway to enable hyerlinks in a PDF when viewing in iBooks or Safari iOS 5? I didn't know if this was an option somewhere in settings.app or a general limitation of PDFs on the iPad. Any thoughts?
-
I switched to iPhone 5C and lost over 150 iTunes I've paid for! How do I get them back?
Lost over 100 purchased iTunes when I switched to 5C from 4. How do I get them back?