NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Pointer to structure ActiveX Interface

Hi,
My Application is a ActiveX COM Server which exposes various methods. In one of the methods I need to pass a pointer to structure.
My develope env is Microsoft Visual C++ .NET 6
In the context of C programming, it would be something similar to this
typedef _MyStruct_s
{
    BOOL blFlag1;
    BOOL blFlag2;
}MyStruct_s;
BOOL MyAPI(MyStruct_s *pstMyStrcut)
{
    BOOL RetVal;
    RetVal = (pstMyStrcut->blFlag1 && pstMyStrcut->blFlag2);
    result RetVal;
}
 
0 Kudos
Message 1 of 4
(3,545 Views)
subhashv,

When you populate this method in your TestStand step, what does it show for the type. Are you having a problem setting this to a variable or is something else going on? What is the actually problem you are seeing?

Brandon Vasquez | Software Engineer | Integration Services | National Instruments
0 Kudos
Message 2 of 4
(3,526 Views)
Hi Brandon,
Looks like this limitation is from TestStand ActiveX adapter, and not from ActiveX/COM itself.
My application is an ActiveX/COM automation server. The same API (which is having issue through TestStand), does not have any issue if it is called from another UI based Standalone application.
(This Standalone application basically implements similar features with GUI by calling the exposed APIs of ActiveX/COM automation server)
 
Is any setting is missing (e.g. Custom Data Type etc) which is causing this problem?
 
I am aware that TestStand does not have any issue with passing a pointer to structure for C DLL.
Please let me know your inputs.
 
Setup:
TestStand 4.0
OS- WindowsXP
 
Thanks and Regards,
Subhash
 
0 Kudos
Message 3 of 4
(3,351 Views)
Hi Subhash,

I have a few followup questions for you:
  1. What is the datatype of the staudiorout and staudiorout1 parameters?
  2. Are these both of the type MyStruct_s as you referenced in your first post?
  3. What is the function prototype of the functions GUI_Audio_SetUIParam and GUI_Audio_UIStart?
  4. How do you have the ActiveX calls setup in TestStand?
  5. What are the current datatypes of the parameters that you are passing?
With some additional information, we should be able to better investigate how to get this working.
0 Kudos
Message 4 of 4
(3,327 Views)