NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

VC++ 6.0 DLL Problems

I am using MSVC++ 6.0 to create a DLL. I am
trying to export a function into TestStand 1.0.

When I use the Specify Module dialog to choose my
DLL, the function ring list does not fill in with
my exported functions.

I DO NOT have a type library for this DLL. Is
that the problem? The TestStand documentation
made it sound like you didn't have to use one for
the function information to be "gathered" by the
DLL Flexible Prototype Adapter.

The function looks like this:

int __declspec( dllexport )MultiplyByTwo (int
inputInt)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());

return inputInt * 2;
}

My project settings are for __cdecl*

This is obviously a bogus program that I am
writing to see if I can link the DLL's that I'd
like
to write in VC++.

The DLL is a MFC DLL.

Any help you can provide would be greatly
appreciated.

Thanks,

Tony Englese
Test Engineer
Tollbridge Technologies
tonye@tollbridgetech.com


Sent via Deja.com http://www.deja.com/
Before you buy.
0 Kudos
Message 1 of 2
(5,354 Views)
You need to put
export "C" { }
around your function definition.

Paul Mueller


In article <7tg1nu$4kf$1@nnrp1.deja.com>,
tony_englese@my-deja.com wrote:
> I am using MSVC++ 6.0 to create a DLL. I am
> trying to export a function into TestStand 1.0.
>
> When I use the Specify Module dialog to choose my
> DLL, the function ring list does not fill in with
> my exported functions.
>
> I DO NOT have a type library for this DLL. Is
> that the problem? The TestStand documentation
> made it sound like you didn't have to use one for
> the function information to be "gathered" by the
> DLL Flexible Prototype Adapter.
>
> The function looks like this:
>
> int __declspec( dllexport )MultiplyByTwo (int
> inputInt)
> {
> AFX_MANAGE_STATE(AfxGetStaticModuleState())
;
>
> return inputInt * 2;
> }
>
> My project settings are for __cdecl*
>
> This is obviously a bogus program that I am
> writing to see if I can link the DLL's that I'd
> like to write in VC++.
>
> The DLL is a MFC DLL.
>
> Any help you can provide would be greatly
> appreciated.
>
> Thanks,
>
> Tony Englese
> Test Engineer
> Tollbridge Technologies
> tonye@tollbridgetech.com
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>


Sent via Deja.com http://www.deja.com/
Before you buy.
0 Kudos
Message 2 of 2
(5,354 Views)