Quantcast
Viewing all articles
Browse latest Browse all 66786

Invoke Node on COM DLL can't configure input properly

I have a COM DLL I am trying to use from LV2013 32 bit. I have managed to get as far as the ActiveX "Automation Open" and an invoke node. This gets me a parameter list which looks right (input and outputs) but I'm not sure the actual datatypes are correct.

 

I have the DLL, a header file and an IDL file and 2 different bits of documentation (not all of which agrees).

 

I am trying initially to just connect to the server using the code below (see test Server Copnnect via dll.png)

 

 

This fails telling me I have incorrect input parameters.

 

One of the bits of documentation lists the paramters as:

char *pConnection                  Required

long ITimeout                          Optional

char *pOption                          Optional

 

but the idl file has:

HRESULT ConnectServer([in] CHAR *szPara)

 

and the header file has:

virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE ConnectServer( /* [in] */  CHAR   __RPC_FAR   *szPara) = 0;

 

I would have thought the idl and header files would be more reliable but then why does the method have 3 parameters?

 

Also the datatypes don't seem right.

szPara should be a pointer which should be Unlt32 for a 32 bit program (which this is) yet the data type reports itself as an I8 (8 bit integer). the szPara should contain connection txt such as "eth:10.10.10.10:5000".

 

I tried to create a string pointer to the data but it doesn't work. I tried typecasting to the I8 but that kills my data and I wind up passing zero to the dll. I tried it then as above but wind up with coercion dots. Do I need to convert my pointer into multiple bytes? (Not sure how to do this).

 

I looked at bunch of other invoke node calls into the same DLL and the parameter direction always seems correct and the data types do change (they are not all integers, some are reporting as real numbers) so it does look like the invoke node is working but I just don't know how to drive it.

 

Am I missing something obvious?

 

Many thanks

 

David

 


Viewing all articles
Browse latest Browse all 66786

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>