jezzzzy Posted June 22, 2009 Share Posted June 22, 2009 I have a DLL that works with a piece of hardware (SComm.dll). I have a Class Library for this DLL (contains different Methods, Properties, Events, etc.). I have tried to do a DLLCall with this SComm.dll file and put a Method name in the Function parameter like this: $dll = DllCall("SComm.dll","str","GetSignalStrength") This returns a "Function Not Found" error. So I did some searching and I now think that I should be using this DLL with COM objects. However, I have tried to create an object with various classes and keep getting failure. Do I need to register the DLL in my system? Maybe I'm using the wrong Class? I'm happy to solve this problem myself, but if someone can point me in the right direction it would be very helpful. I have checked in my system's Component Services but cannot find my class listed. Maybe I'm looking in the wrong section. Maybe my class needs to be registered. Any help is appreciated. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted June 22, 2009 Moderators Share Posted June 22, 2009 The only issue I've ever had with a COM dll is it not being registered, once that happened, the objects were created quite easily. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
jezzzzy Posted June 22, 2009 Author Share Posted June 22, 2009 Is there a certain way to register the DLL or should I simply use regsvr32.exe. Link to comment Share on other sites More sharing options...
jezzzzy Posted June 22, 2009 Author Share Posted June 22, 2009 FYI. When I use regsvr32 I get a message that says "SComm.dll was loaded, but the DllRegisterServer entry point was not found. This file can not be registered." Link to comment Share on other sites More sharing options...
jezzzzy Posted June 22, 2009 Author Share Posted June 22, 2009 Sorry to post several times between responses - but I think this may be relevant. I looked in the OLE Viewer and found my object. It's called SiriusComm.Sirius. However running this: $oSirius = ObjCreate("SiriusComm.Sirius") MsgBox(0,"isObj",isobj($oSirius)) Returns 0. Link to comment Share on other sites More sharing options...
jezzzzy Posted June 23, 2009 Author Share Posted June 23, 2009 Ok. I resolved this issue. Solution is below if anyone else has a similar problem. Apparently my DLL was a .net assembly. I had to use regasm.exe to get the dll registered in the com library. Then I had to use the /codebase switch in regasm to register the DLL in the GAC. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now