Re: New DLL for EXE crashes app
- From: "Lindsay" <lindsay@xxxxxxxx>
- Date: Sat, 2 Apr 2005 03:55:37 +0100
Cheers! It works great now! Except, I have a wierd alias. The function name
is AnimatedTrayRects and the alias is _AnimatedTrayRects@8 . Is there
anything I can do about that?
"Igor Tandetnik" <itandetnik@xxxxxxxx> wrote in message
news:e62fKtxNFHA.568@xxxxxxxxxxxxxxxxxxxxxxx
> "Lindsay" <lindsay@xxxxxxxx> wrote in message
> news:424de44d$0$27857$ed2619ec@xxxxxxxxxxxxxxxxxxxxxxxxxx
>> I've just taken up C++ to be able to write DLLs. One dll (as an
>> experiment) has a routine taken exactly from VB6 (obviously using C++
>> syntax) and is called from VB6 app. When the app starts and the dll
>> is called, the app crashes. However, the dll function does visual
>> animation for the app, and I do see the animation proving the dll
>> works. Why would it crash though?
>
> Make sure the exported function uses __stdcall calling convention. That's
> what VB expects. If you have calling convention mismatch, you end up with
> a trashed stack.
> --
> With best wishes,
> Igor Tandetnik
>
> With sufficient thrust, pigs fly just fine. However, this is not
> necessarily a good idea. It is hard to be sure where they are going to
> land, and it could be dangerous sitting under them as they fly
> overhead. -- RFC 1925
>
.
- Follow-Ups:
- Re: New DLL for EXE crashes app
- From: Frank Hickman [MVP]
- Re: New DLL for EXE crashes app
- References:
- New DLL for EXE crashes app
- From: Lindsay
- Re: New DLL for EXE crashes app
- From: Igor Tandetnik
- New DLL for EXE crashes app
- Prev by Date: Re: New DLL for EXE crashes app
- Next by Date: Re: __cdecl vs __stdcall
- Previous by thread: Re: New DLL for EXE crashes app
- Next by thread: Re: New DLL for EXE crashes app
- Index(es):
Relevant Pages
|