Lua
qry
这个作者很懒,什么都没留下…
展开
-
luajit 2.0下可用的luars232模块
个人觉得Luajit做的相当棒,将本身已经很快的lua脚本运行速度再次提升。而且大部分Lua5.1的外延模块(包括二进制的)在Luajit下仍可使用,但例外的情况总是有的,luars232模块就是其一。查其原因,出在luars232.c里的这一条语句 p = (struct rs232_port_t*) luaL_checkudata(L, 1, MODULE_NAMESPACE);原创 2012-02-12 14:29:21 · 873 阅读 · 1 评论 -
C++ 嵌入 Lua 脚本 示例代码
// lua.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include #include #include #include #include //lua头文件extern "C" //在c++中调用C库{#include #include #i转载 2012-02-25 14:35:21 · 1491 阅读 · 0 评论 -
Luajit 调用Advapi32.dll中API函数输出随机字串
local ffi = require("ffi")ffi.cdef[[int __stdcall CryptAcquireContextW( int *phProv, int pszContainer, int pszProvider, int dwProvType, int dwFlags);int __stdcall CryptGenRandom(原创 2012-03-07 22:12:59 · 770 阅读 · 0 评论 -
luajit调用win32 api函数实现base64编码
local ffi = require("ffi")ffi.cdef[[int CryptBinaryToStringA( const char *pbBinary, int cbBinary, int dwFlags, char * pszString, int *pcchString);]]local crypt = ffi.load(ffi.os ==...原创 2018-10-29 10:39:56 · 517 阅读 · 0 评论 -
luajit调用api函数实现base64编解码
local ffi = require("ffi")ffi.cdef[[int __stdcall CryptBinaryToStringA( const char *pbBinary, int cbBinary, int dwFlags, char * pszString, int *pcchString);int __stdcall CryptStringTo原创 2012-10-05 13:14:19 · 2533 阅读 · 0 评论