[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Why does this cause the script to die?
- From: "Peter Loveday" <peter@...>
- Date: Fri, 27 Dec 2002 00:54:21 -0500
I'm not sure if this is causing your problem or not, but it seems to me that
this function should return 0, not 1; as it pushes no return values on to
the stack.
Love, Light and Peace,
- Peter Loveday
Director of Development, eyeon Software
----- Original Message -----
From: "Rob R" <phantom2023@hotmail.com>
To: "Multiple recipients of list" <lua-l@tecgraf.puc-rio.br>
Sent: Thursday, December 26, 2002 9:53 PM
Subject: Why does this cause the script to die?
>
>
> C++ Function
>
> void CScriptWindow::WriteByte(DWORD address, BYTE value)
> {
> WriteProcessMemory(processhandle, (void *)address, (void *)&value, 1,
> NULL);
> }
>
> Glue function
>
> int l_WriteByte(lua_State* luaVM)
> {
> DWORD address = 0;
> BYTE value = 0;
>
>
> address = (DWORD)lua_tonumber(luaVM, 1);
> value = (BYTE)lua_tonumber(luaVM, 2);
>
> theScriptWindow->WriteByte(address, value);
> return 1;
> }
>
>
> When I include this function in my script, it dies. My other C++ functions
> work fine.
>
> Rob
>
>
> _________________________________________________________________
> Add photos to your messages with MSN 8. Get 2 months FREE*.
>
http://join.msn.com/?page=features/featuredemail&xAPID=42&PS=47575&PI=7324&D
I=7474&SU=
>
http://www.hotmail.msn.com/cgi-bin/getmsg&HL=1216hotmailtaglines_addphotos_3
mf
>
>