Re: Multi VMR9 in VB6
- From: "Alessandro Angeli" <nobody@xxxxxxxxxxxxxxxxxx>
- Date: Wed, 21 Nov 2007 14:48:05 -0500
From: "chris2000"
C --> void KEN_SetWindow(HWND m_hWnd , int set);
VB6 --> Public Declare Sub KEN_SetWindow Lib
"MultiVMR9Api.dll" (ByVal m_hWnd As Long, ByVal iSet As
Long)
and when i check
KEN_SetWindow me.hWnd,1
i take this message "Bad DLL calling convention"
C/C++ defaults to a __cdecl calling convention but VB6 only
supports __stdcall, which is the native Windows calling
convention.
If you can compile the DLL, either set the default calling
convention to __stdcall in the project's properties or
(better) explicitly declare each function as __stdcall. If
you can't, then you will need to write a proxy library that
uses __stdcall in a language that supports __cdecl (e.g.
C/C++ or any .NET language and many others) or give up VB6.
Notice that __stdcall does not support vararg calls.
--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm
.
- Follow-Ups:
- Re: Multi VMR9 in VB6
- From: chris2000
- Re: Multi VMR9 in VB6
- References:
- Multi VMR9 in VB6
- From: chris2000
- Multi VMR9 in VB6
- Prev by Date: Multi VMR9 in VB6
- Next by Date: Re: Multi VMR9 in VB6
- Previous by thread: Multi VMR9 in VB6
- Next by thread: Re: Multi VMR9 in VB6
- Index(es):
Relevant Pages
|
Loading