From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

.net - IDictionary

Hello,

 

I need to create a dictionary of type "System_Collections_Generic_IDictionary_T2" using labwindows CVI.

Can anyone send me a sample code ?

 

Regards

srk

0 Kudos
Message 1 of 5
(4,436 Views)
Hi srk,

Are you currently working with a .NET controller in LabWindows/CVI? Can you give more context for your question?

Thanks,
Daniel Dorroh
National Instruments
0 Kudos
Message 2 of 5
(4,420 Views)

ello Dan,

I created a .net controller in labwindows CVI for dSPACE.HILAPI.MAPort.dll, which generated a .fp/.c/.h that has below function.

int CVIFUNC ASAM_HILAPI_dSPACE_MAPort_MAPort__Create(ASAM_HILAPI_dSPACE_MAPort_MAPort * __instance, System_Collections_Generic_IDictionary_T2 configurationDict, CDotNetHandle * __exception);

I am looking for help in creating dictionary of type 'System_Collections_Generic_IDictionary_T2'. 

I did not find any functions in mscorlib/mscorlib2 which can create a dictionary of type 'System_Collections_Generic_IDictionary_T2'.

 

0 Kudos
Message 3 of 5
(4,405 Views)
Hi srk,

I would expect that type to be present in the function panel for your .NET controller. Do you not see it there? If you try to browse for the type definition of System_Collections_Generic_IDictionary_T2 in your LabWindows/CVI project, does it find anything?

Thanks,
Daniel Dorroh
National Instruments
0 Kudos
Message 4 of 5
(4,395 Views)

Hello Dan,

Definition is pressent in mscorlib.h
typedef struct __System_Collections_Generic_IDictionary_T2 * System_Collections_Generic_IDictionary_T2;

0 Kudos
Message 5 of 5
(4,384 Views)