10-09-2008 05:22 AM
Hi,
I'm writing a step in TS using the Flexible DLL interface. One of the parameters of the function I'm intending to access is void* pData.
My question is how to define a TS parameter to match the dll parameter. The value I need to pass, by the way, is NULL.
Thanks
Rafi
10-09-2008 05:33 AM
Hi,
I think you can use "Nothing" (without quote)
it is a reference to a void object
a2
10-09-2008 05:45 AM
Hi A2 and thanks for the prompt answer,
I don;t understand where to write "nothing"..
When using a Flexible DLL interface, you list your parameters in TS window called 'Edit c/c++ DLL'. For each parameter used, there is on the right side the definitions for that parameter. The first thing to define after the name, is, 'Category' which followed by 'Type' and than 'Pass'.
My question is how define *void in TS. what is the Category? What is the Type? And what is the Pass?
thanks again,
Rafi
10-09-2008 06:45 AM
Hi,
Sorry for my uncomplete response
Name : pData
Category : Object
Type : ActiveX Automation IDispatch Pointer
Pass : By Value
Value : Nothing (and not NULL)
I'm not sure for all these values, I think category must be object, but not for type and pass
a2
10-09-2008 09:40 AM
TestStand does not currently support void pointer parameters. However, if all you want to do is to pass a NULL pointer you can workaround the limitation by creating a Numeric pointer parameter and pass the value Nothing. Make sure Pass is set to By Pointer.
06-20-2023 09:55 AM
Old topic but I have always the same problem today:
I have a function in a DLL with "Flexible parameter".
void DLLEXPORT MyFunction (void *pvParam)
{
char *pcFilename = NULL;
pcFilename = (char *) pvParam;
// Some code to use pcFilename
// ...
}
I want to call this function in teststand, passing a string in parameter pvParam
I assign object reference variable with a string variable to avoid validation type error in seqEdit:
I have tried to set a variable object reference and pass it as a pointer
but I have this runtime error at execution:
I have tried a lot of other variable category without success (Category Object, , IDispatch... but there is an error detected at analysis)
Someone has an idea / a method to solve this kind of problem?
Thank you.
07-05-2023 03:57 AM
up