You've already forked rdsspy-lua-host
mirror of
https://github.com/KubaPro010/rdsspy-lua-host.git
synced 2026-02-26 10:32:34 +01:00
create types.h and also move everything to src
This commit is contained in:
2
Makefile
2
Makefile
@@ -4,7 +4,7 @@ liblua:
|
||||
rm *.o
|
||||
|
||||
build: liblua
|
||||
gcc -O2 -shared -static -o luahost.dll plugin.c api.c liblua -lgdi32 -luser32 -lshell32 \
|
||||
gcc -O2 -shared -static -o luahost.dll src/*.c liblua -lgdi32 -luser32 -lshell32 -Ilua \
|
||||
-Wl,--add-stdcall-alias \
|
||||
-ffunction-sections -fdata-sections
|
||||
|
||||
|
||||
@@ -1,24 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <windows.h>
|
||||
#include <shlobj.h>
|
||||
#include <stdint.h>
|
||||
#include "lua/lua.h"
|
||||
#include "lua/lualib.h"
|
||||
#include "lua/lauxlib.h"
|
||||
|
||||
typedef struct {
|
||||
uint8_t len;
|
||||
uint8_t data[255];
|
||||
} ShortString;
|
||||
|
||||
typedef struct {
|
||||
ShortString Key;
|
||||
ShortString Value;
|
||||
} TRecord;
|
||||
|
||||
typedef struct {
|
||||
int32_t Count;
|
||||
TRecord Records[255];
|
||||
} TDB;
|
||||
#include "lua.h"
|
||||
#include "lualib.h"
|
||||
#include "lauxlib.h"
|
||||
#include "types.h"
|
||||
|
||||
extern HFONT g_hCurrentFont;
|
||||
#define FONT_NAME "Segoe UI"
|
||||
@@ -2,21 +2,6 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
typedef struct {
|
||||
uint16_t Year;
|
||||
uint8_t Month;
|
||||
uint8_t Day;
|
||||
uint8_t Hour;
|
||||
uint8_t Minute;
|
||||
uint8_t Second;
|
||||
uint8_t Centisecond;
|
||||
uint16_t RFU;
|
||||
int32_t Blk1;
|
||||
int32_t Blk2;
|
||||
int32_t Blk3;
|
||||
int32_t Blk4;
|
||||
} TRDSGroup;
|
||||
|
||||
static TRDSGroup Group;
|
||||
|
||||
static HWND hWnd = NULL;
|
||||
@@ -393,8 +378,7 @@ __declspec(dllexport) int WINAPI Initialize(HANDLE hHandle, TDB* DBPointer) {
|
||||
return (int)hWnd;
|
||||
}
|
||||
|
||||
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||
{
|
||||
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
|
||||
if (fdwReason == DLL_PROCESS_ATTACH) hInst = hinstDLL;
|
||||
return TRUE;
|
||||
}
|
||||
33
src/types.h
Normal file
33
src/types.h
Normal file
@@ -0,0 +1,33 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct {
|
||||
uint8_t len;
|
||||
uint8_t data[255];
|
||||
} ShortString;
|
||||
|
||||
typedef struct {
|
||||
ShortString Key;
|
||||
ShortString Value;
|
||||
} TRecord;
|
||||
|
||||
typedef struct {
|
||||
int32_t Count;
|
||||
TRecord Records[255];
|
||||
} TDB;
|
||||
|
||||
typedef struct {
|
||||
uint16_t Year;
|
||||
uint8_t Month;
|
||||
uint8_t Day;
|
||||
uint8_t Hour;
|
||||
uint8_t Minute;
|
||||
uint8_t Second;
|
||||
uint8_t Centisecond;
|
||||
uint16_t RFU;
|
||||
int32_t Blk1;
|
||||
int32_t Blk2;
|
||||
int32_t Blk3;
|
||||
int32_t Blk4;
|
||||
} TRDSGroup;
|
||||
Reference in New Issue
Block a user