[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Why does this cause the script to die?
- From: "Rob R" <phantom2023@...>
- Date: Thu, 26 Dec 2002 20:53:34 -0600
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&DI=7474&SU=
http://www.hotmail.msn.com/cgi-bin/getmsg&HL=1216hotmailtaglines_addphotos_3mf