01-12-2011 11:38 AM
Hi All,
I'm using Labwindows/CVI 8.5 & Test stand 3.5. when I try to pass Test stand C Struct to labwindows, getting the following error in Test stand.
Error Info :
Expected instance of type structReadConfig, passed object without type.
Error in parameter 1, 'pConfig'.
-17311; Could not accept the parameters passed in.
Request you all to assist me in solve this issue.
Thanks
G'Ramy
01-17-2011 01:11 PM
Structs in C can be passed by value or by reference.
Looks like maybe you're trying to pass a struct by reference when a pointer to a struct is expected?
Then again, normally you'd get a compile time error if you're calling a function in a DLL from code using a header filefor the DLL and the corresponding DLL library.
If there's some sort of dynamic binding happening then it's more likely that you could get crossed up on the struct passage by value / by reference.
Menchar
01-19-2011 06:34 AM
Hi menchar,
Thanks for your reply.
In Test stand 3.5, there is no separate options for by Reference & by Pointer. Please see the attached screenshot.
In Dll side (LabWindows/CVI), my API declaration is like below,
void __declspec(dllexport) __stdcall Lib_Hdom_GetAllConfig( struct structReadConfig *pConfig,
short *errorOccurred, long *errorCode, char *errorMsg);
help me in solving this.
Thanks
G'Ramy
01-19-2011 06:35 AM
Hi menchar,
Thanks for your reply.
In Test stand 3.5, there is no separate options for by Reference & by Pointer. Please see the attached screenshot.
In Dll side (LabWindows/CVI), my API declaration is like below,
void __declspec(dllexport) __stdcall Lib_Hdom_GetAllConfig( struct structReadConfig *pConfig,
short *errorOccurred, long *errorCode, char *errorMsg);
help me in solving this.
Thanks
G'Ramy