VisualStudio Installshield DLL calling

Hi,

This may not be the right sight, but in case some one has the solution.

As far as I found, that the installshield(IS) that comes with VisualStudio
6.0 has only one way to call dll from IS script, using something like
CallDLLfx(…). I tried to follow the restriction and was able to see the
call goes to DLL_PROCESS_ATTACH ( I mean the dll was found, loaded, and
attaching). But I could not get to a function using the above function.

If anyone has the right prototype etc, for calling dll f() then I that
would be of lot of help.

TIA
prokash

Did you export the function? Try a dumpbin /exports your.dll
to see if it is exported.

It may also need to be exported extern “C”.

Or you can export it in your exports file.

-Jeff

-----Original Message-----
From: xxxxx@garlic.com [mailto:xxxxx@garlic.com]
Sent: Thursday, July 10, 2003 1:14 PM
To: NT Developers Interest List
Subject: [ntdev] VisualStudio Installshield DLL calling

Hi,

This may not be the right sight, but in case some one has the solution.

As far as I found, that the installshield(IS) that comes with VisualStudio
6.0 has only one way to call dll from IS script, using something like
CallDLLfx(…). I tried to follow the restriction and was able to see the
call goes to DLL_PROCESS_ATTACH ( I mean the dll was found, loaded, and
attaching). But I could not get to a function using the above function.

If anyone has the right prototype etc, for calling dll f() then I that
would be of lot of help.

TIA
prokash


You are currently subscribed to ntdev as: xxxxx@concord.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
the latest virus scan software available for the presence of computer
viruses.
**********************************************************************

Here is the way I do:

LONG DLL_XXX(HWND hDump, LPLONG lpDump, LPSTR szDump)
{
/* Put you stuff here */
}

make sure it is exported in the xxx.def.

In the IS, you need to load the dll first before you call the fuction:

UseDLL(YouDllPath);

Then you can call it like this:

nResult = CallDLLFx( YourDllPath, “DLL_XXX”, nTemp, szTemp );

Lin

I did exported, and by using the depends utility, I see the dll function
is exported w/o c++ mangling. In the signature I used this – code

// IShield.cpp : Defines the entry point for the DLL application.
//

#include <windows.h>

BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call) {
case DLL_PROCESS_ATTACH:
Beep(1000, 1000);
break;

case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:

break;
}

return TRUE;
}

#ifdef cplusplus
extern “C” {
LONG __declspec(dllexport) WINAPI IStest (HWND hwnd, LPLONG lpIValue,
LPSTR lpszValue);
}
#endif

LONG__declspec(dllexport) WINAPI IStest (HWND hwnd, LPLONG lpIValue,
LPSTR lpszValue)
{
*lpIValue = 01234567;

Beep(3000, 1000);

return 3210;

}

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Curless, Jeffrey
Sent: Thursday, July 10, 2003 10:22 AM
To: NT Developers Interest List
Subject: [ntdev] RE: VisualStudio Installshield DLL calling

Did you export the function? Try a dumpbin /exports your.dll
to see if it is exported.

It may also need to be exported extern “C”.

Or you can export it in your exports file.

-Jeff

-----Original Message-----
From: xxxxx@garlic.com [mailto:xxxxx@garlic.com]
Sent: Thursday, July 10, 2003 1:14 PM
To: NT Developers Interest List
Subject: [ntdev] VisualStudio Installshield DLL calling

Hi,

This may not be the right sight, but in case some one has the solution.

As far as I found, that the installshield(IS) that comes with VisualStudio
6.0 has only one way to call dll from IS script, using something like
CallDLLfx(…). I tried to follow the restriction and was able to see the
call goes to DLL_PROCESS_ATTACH ( I mean the dll was found, loaded, and
attaching). But I could not get to a function using the above function.

If anyone has the right prototype etc, for calling dll f() then I that
would be of lot of help.

TIA
prokash


You are currently subscribed to ntdev as: xxxxx@concord.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
the latest virus scan software available for the presence of computer
viruses.



You are currently subscribed to ntdev as: xxxxx@vormetric.com
To unsubscribe send a blank email to xxxxx@lists.osr.com</windows.h>

Try exporting using a .def file. I had an issue like this the other day.
Exporting using the .def file worked for me.

-Jeff

-----Original Message-----
From: Prokash Sinha [mailto:xxxxx@vormetric.com]
Sent: Thursday, July 10, 2003 4:06 PM
To: NT Developers Interest List
Subject: [ntdev] RE: VisualStudio Installshield DLL calling

I did exported, and by using the depends utility, I see the dll function
is exported w/o c++ mangling. In the signature I used this – code

// IShield.cpp : Defines the entry point for the DLL application.
//

#include <windows.h>

BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call) {
case DLL_PROCESS_ATTACH:
Beep(1000, 1000);
break;

case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:

break;
}

return TRUE;
}

#ifdef cplusplus
extern “C” {
LONG __declspec(dllexport) WINAPI IStest (HWND hwnd, LPLONG lpIValue,
LPSTR lpszValue);
}
#endif

LONG__declspec(dllexport) WINAPI IStest (HWND hwnd, LPLONG lpIValue,
LPSTR lpszValue)
{
*lpIValue = 01234567;

Beep(3000, 1000);

return 3210;

}

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Curless, Jeffrey
Sent: Thursday, July 10, 2003 10:22 AM
To: NT Developers Interest List
Subject: [ntdev] RE: VisualStudio Installshield DLL calling

Did you export the function? Try a dumpbin /exports your.dll
to see if it is exported.

It may also need to be exported extern “C”.

Or you can export it in your exports file.

-Jeff

-----Original Message-----
From: xxxxx@garlic.com [mailto:xxxxx@garlic.com]
Sent: Thursday, July 10, 2003 1:14 PM
To: NT Developers Interest List
Subject: [ntdev] VisualStudio Installshield DLL calling

Hi,

This may not be the right sight, but in case some one has the solution.

As far as I found, that the installshield(IS) that comes with VisualStudio
6.0 has only one way to call dll from IS script, using something like
CallDLLfx(…). I tried to follow the restriction and was able to see the
call goes to DLL_PROCESS_ATTACH ( I mean the dll was found, loaded, and
attaching). But I could not get to a function using the above function.

If anyone has the right prototype etc, for calling dll f() then I that
would be of lot of help.

TIA
prokash


You are currently subscribed to ntdev as: xxxxx@concord.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
the latest virus scan software available for the presence of computer
viruses.



You are currently subscribed to ntdev as: xxxxx@vormetric.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@concord.com
To unsubscribe send a blank email to xxxxx@lists.osr.com</windows.h>

I believe you need to declare them as cdecl like so:

__declspec( dllexport ) LONG __cdecl IStest (HWND hwnd, LPLONG lpIValue,
LPSTR lpszValue);

that works for my installshield dll.
Thanks,
Rob

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:bounce-ntdev-
xxxxx@lists.osr.com] On Behalf Of Prokash Sinha
Sent: Thursday, July 10, 2003 4:06 PM
To: NT Developers Interest List
Subject: [ntdev] RE: VisualStudio Installshield DLL calling

I did exported, and by using the depends utility, I see the dll
function
is exported w/o c++ mangling. In the signature I used this – code

// IShield.cpp : Defines the entry point for the DLL application.
//

#include <windows.h>
>
> BOOL APIENTRY DllMain( HANDLE hModule,
> DWORD ul_reason_for_call,
> LPVOID lpReserved
> )
> {
> switch (ul_reason_for_call) {
> case DLL_PROCESS_ATTACH:
> Beep(1000, 1000);
> break;
>
> case DLL_THREAD_ATTACH:
> case DLL_THREAD_DETACH:
> case DLL_PROCESS_DETACH:
>
> break;
> }
>
> return TRUE;
> }
>
> #ifdef cplusplus
> extern “C” {
> LONG __declspec(dllexport) WINAPI IStest (HWND hwnd, LPLONG
lpIValue,
> LPSTR lpszValue);
> }
> #endif
>
> LONG__declspec(dllexport) WINAPI IStest (HWND hwnd, LPLONG
lpIValue,
> LPSTR lpszValue)
> {
> *lpIValue = 01234567;
>
> Beep(3000, 1000);
>
>
> return 3210;
>
> }
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com]On Behalf Of Curless, Jeffrey
> Sent: Thursday, July 10, 2003 10:22 AM
> To: NT Developers Interest List
> Subject: [ntdev] RE: VisualStudio Installshield DLL calling
>
>
> Did you export the function? Try a dumpbin /exports your.dll
> to see if it is exported.
>
> It may also need to be exported extern “C”.
>
> Or you can export it in your exports file.
>
> -Jeff
>
> -----Original Message-----
> From: xxxxx@garlic.com [mailto:xxxxx@garlic.com]
> Sent: Thursday, July 10, 2003 1:14 PM
> To: NT Developers Interest List
> Subject: [ntdev] VisualStudio Installshield DLL calling
>
>
> Hi,
>
> This may not be the right sight, but in case some one has the
solution.
>
> As far as I found, that the installshield(IS) that comes with
VisualStudio
> 6.0 has only one way to call dll from IS script, using something like
> CallDLLfx(…). I tried to follow the restriction and was able to see
the
> call goes to DLL_PROCESS_ATTACH ( I mean the dll was found, loaded,
and
> attaching). But I could not get to a function using the above
function.
>
> If anyone has the right prototype etc, for calling dll f() then I that
> would be of lot of help.
>
> TIA
> prokash
>
> —
> You are currently subscribed to ntdev as: xxxxx@concord.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the system manager.
> This footnote also confirms that this email message has been swept by
> the latest virus scan software available for the presence of computer
> viruses.
>

>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@vormetric.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@cdp.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com</windows.h>

I did create a def file, as the doc said. Also the APIENTRY is to have
PASCAL CALL CONVENTION, so I need to try now
for Rob’s method.

Now that U said it works, it will try that.
Thanx to both of you.
-prokash
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Curless, Jeffrey
Sent: Thursday, July 10, 2003 1:12 PM
To: NT Developers Interest List
Subject: [ntdev] RE: VisualStudio Installshield DLL calling

Try exporting using a .def file. I had an issue like this the other day.
Exporting using the .def file worked for me.

-Jeff

-----Original Message-----
From: Prokash Sinha [mailto:xxxxx@vormetric.com]
Sent: Thursday, July 10, 2003 4:06 PM
To: NT Developers Interest List
Subject: [ntdev] RE: VisualStudio Installshield DLL calling

I did exported, and by using the depends utility, I see the dll function
is exported w/o c++ mangling. In the signature I used this – code

// IShield.cpp : Defines the entry point for the DLL application.
//

#include <windows.h>

BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call) {
case DLL_PROCESS_ATTACH:
Beep(1000, 1000);
break;

case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:

break;
}

return TRUE;
}

#ifdef cplusplus
extern “C” {
LONG __declspec(dllexport) WINAPI IStest (HWND hwnd, LPLONG lpIValue,
LPSTR lpszValue);
}
#endif

LONG__declspec(dllexport) WINAPI IStest (HWND hwnd, LPLONG lpIValue,
LPSTR lpszValue)
{
*lpIValue = 01234567;

Beep(3000, 1000);

return 3210;

}

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Curless, Jeffrey
Sent: Thursday, July 10, 2003 10:22 AM
To: NT Developers Interest List
Subject: [ntdev] RE: VisualStudio Installshield DLL calling

Did you export the function? Try a dumpbin /exports your.dll
to see if it is exported.

It may also need to be exported extern “C”.

Or you can export it in your exports file.

-Jeff

-----Original Message-----
From: xxxxx@garlic.com [mailto:xxxxx@garlic.com]
Sent: Thursday, July 10, 2003 1:14 PM
To: NT Developers Interest List
Subject: [ntdev] VisualStudio Installshield DLL calling

Hi,

This may not be the right sight, but in case some one has the solution.

As far as I found, that the installshield(IS) that comes with VisualStudio
6.0 has only one way to call dll from IS script, using something like
CallDLLfx(…). I tried to follow the restriction and was able to see the
call goes to DLL_PROCESS_ATTACH ( I mean the dll was found, loaded, and
attaching). But I could not get to a function using the above function.

If anyone has the right prototype etc, for calling dll f() then I that
would be of lot of help.

TIA
prokash


You are currently subscribed to ntdev as: xxxxx@concord.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
the latest virus scan software available for the presence of computer
viruses.



You are currently subscribed to ntdev as: xxxxx@vormetric.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@concord.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@vormetric.com
To unsubscribe send a blank email to xxxxx@lists.osr.com</windows.h>

Whether you use __declspec(dllexport) or a .def file, the result is the
same. Use dumpbin /exports like you mentioned earlier to verify this.
If your function is declared with __stdcall rather than __cdecl, you
will of course have to refer to the function by its “decorated” name
“IStest@12”. Of course, you will want to check the InstallShield
documentation on what calling convention to use.

Also, to nitpick, your function prototype is redundant. Try this:

#ifdef __cplusplus
extern “C”
#endif
LONG __declspec(dllexport) WINAPI IStest (HWND hwnd, LPLONG lpIValue,
LPSTR lpszValue)
{
*lpIValue = 01234567;
Beep(3000, 1000);
return 3210;
}

Chuck

----- Original Message -----
From: “Curless, Jeffrey”
To: “NT Developers Interest List”
Sent: Friday, July 11, 2003 3:12 AM
Subject: [ntdev] RE: VisualStudio Installshield DLL calling

> Try exporting using a .def file. I had an issue like this the other
day.
> Exporting using the .def file worked for me.
>
> -Jeff
>
> -----Original Message-----
> From: Prokash Sinha [mailto:xxxxx@vormetric.com]
> Sent: Thursday, July 10, 2003 4:06 PM
> To: NT Developers Interest List
> Subject: [ntdev] RE: VisualStudio Installshield DLL calling
>
>
> I did exported, and by using the depends utility, I see the dll
function
> is exported w/o c++ mangling. In the signature I used this – code
>
> // IShield.cpp : Defines the entry point for the DLL application.
> //
>
> #include <windows.h>
>
> BOOL APIENTRY DllMain( HANDLE hModule,
> DWORD ul_reason_for_call,
> LPVOID lpReserved
> )
> {
> switch (ul_reason_for_call) {
> case DLL_PROCESS_ATTACH:
> Beep(1000, 1000);
> break;
>
> case DLL_THREAD_ATTACH:
> case DLL_THREAD_DETACH:
> case DLL_PROCESS_DETACH:
>
> break;
> }
>
> return TRUE;
> }
>
> #ifdef cplusplus
> extern “C” {
> LONG __declspec(dllexport) WINAPI IStest (HWND hwnd, LPLONG
lpIValue,
> LPSTR lpszValue);
> }
> #endif
>
> LONG__declspec(dllexport) WINAPI IStest (HWND hwnd, LPLONG
lpIValue,
> LPSTR lpszValue)
> {
> *lpIValue = 01234567;
>
> Beep(3000, 1000);
>
>
> return 3210;
>
> }
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com]On Behalf Of Curless, Jeffrey
> Sent: Thursday, July 10, 2003 10:22 AM
> To: NT Developers Interest List
> Subject: [ntdev] RE: VisualStudio Installshield DLL calling
>
>
> Did you export the function? Try a dumpbin /exports your.dll
> to see if it is exported.
>
> It may also need to be exported extern “C”.
>
> Or you can export it in your exports file.
>
> -Jeff
>
> -----Original Message-----
> From: xxxxx@garlic.com [mailto:xxxxx@garlic.com]
> Sent: Thursday, July 10, 2003 1:14 PM
> To: NT Developers Interest List
> Subject: [ntdev] VisualStudio Installshield DLL calling
>
>
> Hi,
>
> This may not be the right sight, but in case some one has the
solution.
>
> As far as I found, that the installshield(IS) that comes with
VisualStudio
> 6.0 has only one way to call dll from IS script, using something like
> CallDLLfx(…). I tried to follow the restriction and was able to see
the
> call goes to DLL_PROCESS_ATTACH ( I mean the dll was found, loaded,
and
> attaching). But I could not get to a function using the above
function.
>
> If anyone has the right prototype etc, for calling dll f() then I that
> would be of lot of help.
>
> TIA
> prokash</windows.h>

> Whether you use __declspec(dllexport) or a .def file, the result is
the

same.

__declspec(dllexport) will export xxxxx@4 or similar name.
The .DEF file entry will export the plain “YourFunc”.

Max

I recommend checking http://www.installsite.org/
Joze

-----Original Message-----
From: xxxxx@garlic.com [mailto:xxxxx@garlic.com]
Sent: Thursday, July 10, 2003 7:14 PM
To: NT Developers Interest List
Subject: [ntdev] VisualStudio Installshield DLL calling

Hi,

This may not be the right sight, but in case some one has the solution.

As far as I found, that the installshield(IS) that comes with VisualStudio
6.0 has only one way to call dll from IS script, using something like
CallDLLfx(…). I tried to follow the restriction and was able to see the
call goes to DLL_PROCESS_ATTACH ( I mean the dll was found, loaded, and
attaching). But I could not get to a function using the above function.

If anyone has the right prototype etc, for calling dll f() then I that
would be of lot of help.

TIA
prokash


You are currently subscribed to ntdev as: xxxxx@hermes.si
To unsubscribe send a blank email to xxxxx@lists.osr.com

Here again,

Now I build an empty dll project using VC6.0. Then I basically copied those
lines to a new file, and I gave file extension .c.

Then I tried both the .def file, as well as _declespec(export). In both
cases I can see that the export function does not have
name mangling by veiwing thru depends utility. BUT STILL CAN NOT GET THE
FUNCTION BEING INVOKED…

Any help is appreciated. Again this is the Installshield that comes with the
msdn vc disks.

=prokash

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Curless, Jeffrey
Sent: Thursday, July 10, 2003 1:12 PM
To: NT Developers Interest List
Subject: [ntdev] RE: VisualStudio Installshield DLL calling

Try exporting using a .def file. I had an issue like this the other day.
Exporting using the .def file worked for me.

-Jeff

-----Original Message-----
From: Prokash Sinha [mailto:xxxxx@vormetric.com]
Sent: Thursday, July 10, 2003 4:06 PM
To: NT Developers Interest List
Subject: [ntdev] RE: VisualStudio Installshield DLL calling

I did exported, and by using the depends utility, I see the dll function
is exported w/o c++ mangling. In the signature I used this – code

// IShield.cpp : Defines the entry point for the DLL application.
//

#include <windows.h>

BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call) {
case DLL_PROCESS_ATTACH:
Beep(1000, 1000);
break;

case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:

break;
}

return TRUE;
}

#ifdef cplusplus
extern “C” {
LONG __declspec(dllexport) WINAPI IStest (HWND hwnd, LPLONG lpIValue,
LPSTR lpszValue);
}
#endif

LONG__declspec(dllexport) WINAPI IStest (HWND hwnd, LPLONG lpIValue,
LPSTR lpszValue)
{
*lpIValue = 01234567;

Beep(3000, 1000);

return 3210;

}

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Curless, Jeffrey
Sent: Thursday, July 10, 2003 10:22 AM
To: NT Developers Interest List
Subject: [ntdev] RE: VisualStudio Installshield DLL calling

Did you export the function? Try a dumpbin /exports your.dll
to see if it is exported.

It may also need to be exported extern “C”.

Or you can export it in your exports file.

-Jeff

-----Original Message-----
From: xxxxx@garlic.com [mailto:xxxxx@garlic.com]
Sent: Thursday, July 10, 2003 1:14 PM
To: NT Developers Interest List
Subject: [ntdev] VisualStudio Installshield DLL calling

Hi,

This may not be the right sight, but in case some one has the solution.

As far as I found, that the installshield(IS) that comes with VisualStudio
6.0 has only one way to call dll from IS script, using something like
CallDLLfx(…). I tried to follow the restriction and was able to see the
call goes to DLL_PROCESS_ATTACH ( I mean the dll was found, loaded, and
attaching). But I could not get to a function using the above function.

If anyone has the right prototype etc, for calling dll f() then I that
would be of lot of help.

TIA
prokash


You are currently subscribed to ntdev as: xxxxx@concord.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
the latest virus scan software available for the presence of computer
viruses.



You are currently subscribed to ntdev as: xxxxx@vormetric.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@concord.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@vormetric.com
To unsubscribe send a blank email to xxxxx@lists.osr.com</windows.h>

Hay Rob,

Is that all we need. In this case there is no need to have a .def file.
Since we are expliciting saying the export.

I created an empty dll project, and tried the following file (testdll.dll ).
Since it is a .c file, there is no need
for extern. But I still could not invoke the function.

Are you using vc 6.0 installshield that comes with msdn cd.

thanx
-prokash

#include <windows.h>

BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call) {
case DLL_PROCESS_ATTACH:
//Beep(1000, 1000);
break;

case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:

break;
}

return TRUE;
}

/
#ifdef cplusplus
extern “C” {
__declspec( dllexport ) LONG__cdecl IStest (HWND hwnd, LPLONG
lpIValue,LPSTR lpszValue);

#pragma comment(" c++");

}
#endif
/

//LONG __declspec(dllexport) _stdcall /APIENTRY/ IStest (HWND hwnd,
LPLONG lpIValue, LPSTR lpszValue)
//LONG__cdecl IStest (HWND hwnd, LPLONG lpIValue,LPSTR lpszValue)
__declspec( dllexport ) LONG__cdecl IStest (HWND hwnd, LPLONG
lpIValue,LPSTR lpszValue)

{
*lpIValue = 01234567;

Beep(3000, 1000);

Beep(3000, 1000);

return 3210;

}
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Rob Green
Sent: Thursday, July 10, 2003 1:19 PM
To: NT Developers Interest List
Subject: [ntdev] RE: VisualStudio Installshield DLL calling

I believe you need to declare them as cdecl like so:

__declspec( dllexport ) LONG__cdecl IStest (HWND hwnd, LPLONG lpIValue,
LPSTR lpszValue);

that works for my installshield dll.
Thanks,
Rob

> -----Original Message-----
> From: xxxxx@lists.osr.com [mailto:bounce-ntdev-
> xxxxx@lists.osr.com] On Behalf Of Prokash Sinha
> Sent: Thursday, July 10, 2003 4:06 PM
> To: NT Developers Interest List
> Subject: [ntdev] RE: VisualStudio Installshield DLL calling
>
> I did exported, and by using the depends utility, I see the dll
function
> is exported w/o c++ mangling. In the signature I used this – code
>
> // IShield.cpp : Defines the entry point for the DLL application.
> //
>
> #include <windows.h>
>
> BOOL APIENTRY DllMain( HANDLE hModule,
> DWORD ul_reason_for_call,
> LPVOID lpReserved
> )
> {
> switch (ul_reason_for_call) {
> case DLL_PROCESS_ATTACH:
> Beep(1000, 1000);
> break;
>
> case DLL_THREAD_ATTACH:
> case DLL_THREAD_DETACH:
> case DLL_PROCESS_DETACH:
>
> break;
> }
>
> return TRUE;
> }
>
> #ifdef cplusplus
> extern “C” {
> LONG __declspec(dllexport) WINAPI IStest (HWND hwnd, LPLONG
lpIValue,
> LPSTR lpszValue);
> }
> #endif
>
> LONG__declspec(dllexport) WINAPI IStest (HWND hwnd, LPLONG
lpIValue,
> LPSTR lpszValue)
> {
> *lpIValue = 01234567;
>
> Beep(3000, 1000);
>
>
> return 3210;
>
> }
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com]On Behalf Of Curless, Jeffrey
> Sent: Thursday, July 10, 2003 10:22 AM
> To: NT Developers Interest List
> Subject: [ntdev] RE: VisualStudio Installshield DLL calling
>
>
> Did you export the function? Try a dumpbin /exports your.dll
> to see if it is exported.
>
> It may also need to be exported extern “C”.
>
> Or you can export it in your exports file.
>
> -Jeff
>
> -----Original Message-----
> From: xxxxx@garlic.com [mailto:xxxxx@garlic.com]
> Sent: Thursday, July 10, 2003 1:14 PM
> To: NT Developers Interest List
> Subject: [ntdev] VisualStudio Installshield DLL calling
>
>
> Hi,
>
> This may not be the right sight, but in case some one has the
solution.
>
> As far as I found, that the installshield(IS) that comes with
VisualStudio
> 6.0 has only one way to call dll from IS script, using something like
> CallDLLfx(…). I tried to follow the restriction and was able to see
the
> call goes to DLL_PROCESS_ATTACH ( I mean the dll was found, loaded,
and
> attaching). But I could not get to a function using the above
function.
>
> If anyone has the right prototype etc, for calling dll f() then I that
> would be of lot of help.
>
> TIA
> prokash
>
> —
> You are currently subscribed to ntdev as: xxxxx@concord.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the system manager.
> This footnote also confirms that this email message has been swept by
> the latest virus scan software available for the presence of computer
> viruses.
>

>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@vormetric.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@cdp.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@vormetric.com
To unsubscribe send a blank email to xxxxx@lists.osr.com</windows.h></windows.h>