[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: simple Lua alien question
- From: "King, Mike" <MKing@...>
- Date: Mon, 28 Feb 2011 13:24:37 -0500
>> Running the following commands causes an access violation when Sleep returns. What am
>> I doing wrong? I'm using the latest version of Lua for Windows (v5.1.4-40).
>>
>> require "alien"
>> Sleep = alien.kernel32.Sleep
>> Sleep:types('void', 'int')
>> Sleep(1000)
>>
> Likely because you declare 'Sleep' as 'void(*)(int)', but Sleep
> actually takes a DWORD, which is usually typedef'd to 'double'. More
> information at MSDN:
> http://msdn.microsoft.com/en-us/library/ms686298.aspx
Version 0.4.1 of alien doesn't offer unsigned types.
> Also, I don't know if that "CONFIDENTIALITY NOTICE" is supposed your
> signature or not, but I think it might be a tiny wee bit too long...
I have no control over it... sorry
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is confidential or proprietary to K&L Microwave, Inc. Any unauthorized review, use, disclosure or distribution is prohibited.
If this communication has been transmitted from a U.S. location it may also contain data subject to the International Traffic in Arms Regulations or U.S. Export Administration Regulations and, if so, cannot be disseminated, distributed or copied to foreign nationals, residing in the U.S. or abroad, without the prior approval of the U.S. Department of State or appropriate export licensing authority. If you have received this communication in error, please notify the sender by reply e-mail and delete or destroy all copies of this e-mail message and/or any file attachment(s).