付属のサンプルを 色々切り取ってコンパイルしまくる
#include <windows.h>
#include "hspdll.h"
int WINAPI DllMain (HINSTANCE hInstance, DWORD fdwReason, PVOID pvReserved)
{
return TRUE ;
}
EXPORT BOOL WINAPI test1( PVAL2 *pval, int p1, int p2, int p3 )
{
//DLL test1 (type$83)
//指定した変数に、「文字列テスト」を代入する。
//変数の型が数値型だった場合も、文字列型にする。
//
char *pt;
if (pval->flag==4) pval->flag=2;// 文字列型に
pt=pval->pt;
strcpy( pt,"文字列テスト" );
return 0;
}
//----------------
test.as
#uselib "test.dll"
#func test1 test1 $83
mes "\ntest1"
a=0
test1 a; 変数文字列設定
mes "A="+a
stop