// ===== PlugInSDK API \82Ì\90é\8c¾
type
+ // *************************************************************************
+ // CreateResultString
// \96ß\82è\92l\82ª PChar \82Å\82 \82é API \82Ì\83\81\83\82\83\8a\82ð\8am\95Û\82·\82é
+ // *************************************************************************
TCreateResultString = function(
resultStr : string
) : PChar; stdcall;
+
+ // *************************************************************************
+ // DisposeResultString
// \96ß\82è\92l\82ª PChar \82Å\82 \82é API \82Ì\83\81\83\82\83\8a\82ð\8aJ\95ú\82·\82é
+ // *************************************************************************
TDisposeResultString = procedure(
resultStr : PChar
); stdcall;
- // \83p\83X\82ð\8eæ\93¾\82·\82é
- TPathFunction = function : PChar; stdcall;
+
+ // *************************************************************************
+ // InternalDownload
// \8ew\92è\82µ\82½ URL \82ð\83_\83E\83\93\83\8d\81[\83h\82µ\82Ä\95Ô\82·
+ // *************************************************************************
TInternalDownload = function(
inURL : PChar // \83_\83E\83\93\83\8d\81[\83h\82·\82é URL
) : PChar; stdcall; // \83_\83E\83\93\83\8d\81[\83h\82³\82ê\82½\95¶\8e\9a\97ñ
+
+ // *************************************************************************
+ // InternalAbon
// \82Q\82¿\82á\82ñ\82Ë\82é\82Ì dat \8c`\8e®\82ð\83\8d\81[\83J\83\8b\82 \82Ú\81`\82ñ\82É\92Ê\82·
+ // *************************************************************************
TInternalAbon = function(
inDatText : PChar // \96¼\91O<>\83\81\81[\83\8b<>\93ú\95tID<>\96{\95¶<>[\89ü\8ds] \82Å\8d\\90¬\82³\82ê\82½\83e\83L\83X\83g
) : PChar; stdcall; // \82 \82Ú\81`\82ñ\8dÏ\82Ý\82Ì dat \8c`\8e®\83e\83L\83X\83g
+
+ // *************************************************************************
+ // InternalSkin
// \82Q\82¿\82á\82ñ\82Ë\82é\82Ì dat \8c`\8e® 1 \8ds\82ð\83X\83L\83\93\82É\92Ê\82·
+ // *************************************************************************
TInternalSkin = function(
inDatRes : PChar; // \96¼\91O<>\83\81\81[\83\8b<>\93ú\95tID<>\96{\95¶<> \82Å\8d\\90¬\82³\82ê\82½\83e\83L\83X\83g
inResNo : DWORD; // \83\8c\83X\94Ô\8d\86
) : PChar; stdcall; // \90®\8c`\82³\82ê\82½ HTML
var
- CreateResultString : TCreateResultString;
- DisposeResultString : TDisposeResultString;
- // \83u\83\89\83E\83U\96{\91Ì\82ª\92u\82¢\82Ä\82 \82é\83t\83H\83\8b\83_
- ApplicationFolder : TPathFunction;
- // \8f\89\8aú\90Ý\92è\83t\83H\83\8b\83_
- PreferencesFolder : TPathFunction;
- // \8f\89\8aú\90Ý\92è\83t\83@\83C\83\8b
- PreferencesFile : TPathFunction;
- // \83\8d\83O\83t\83H\83\8b\83_
- LogFolder : TPathFunction;
- // CSS \83t\83H\83\8b\83_
- CSSFolder : TPathFunction;
- // \83X\83L\83\93\82ð\93ü\82ê\82Ä\82¨\82\83t\83H\83\8b\83_
- SkinFolder : TPathFunction;
- // \8eg\97p\82µ\82Ä\82¢\82é CSS / \83X\83L\83\93
- SkinFile : TPathFunction;
- Download : TInternalDownload;
- Abon : TInternalAbon;
- Skin : TInternalSkin;
+ CreateResultString : TCreateResultString;
+ DisposeResultString : TDisposeResultString;
+ InternalDownload : TInternalDownload;
+ InternalAbon : TInternalAbon;
+ InternalSkin : TInternalSkin;
// ===== Win32 API
function GetModuleHandle(
nSize : DWORD
) : DWORD; stdcall; external 'kernel32';
-// \83G\83\93\83g\83\8a\83|\83C\83\93\83g
-procedure DLLEntry(
- ul_reason_for_call : DWORD
-);
-
-// \83_\83~\81[\82Ì\83p\83X\82ð\95Ô\82·
-function DummyPath : PChar;
-
+// *************************************************************************
// PlugInSDK \82Ì API \82ð\8f\89\8aú\89»
+// *************************************************************************
procedure LoadInternalAPI;
implementation
-// \83G\83\93\83g\83\8a\83|\83C\83\93\83g
-procedure DLLEntry(
- ul_reason_for_call : DWORD
-);
-begin
-
- case ul_reason_for_call of
- DLL_PROCESS_ATTACH:
- LoadInternalAPI;
- DLL_PROCESS_DETACH:
- ;
- DLL_THREAD_ATTACH:
- ;
- DLL_THREAD_DETACH:
- ;
- end;
-
-end;
-
-// \83_\83~\81[\82Ì\83p\83X\82ð\95Ô\82·
-function DummyPath : PChar;
-begin
-
- Result := CreateResultString( '' );
-
-end;
-
+// *************************************************************************
// PlugInSDK \82Ì API \82ð\8f\89\8aú\89»
+// *************************************************************************
procedure LoadInternalAPI;
var
module : HMODULE;
module := GetModuleHandle( nil );
- // \96ß\82è\92l\8aJ\95ú\8aÖ\90\94
+ // \96ß\82è\92l\8am\95Û\8aJ\95ú\8aÖ\90\94
// \8cÄ\82Ñ\8fo\82µ\91¤\82Å\83\81\83\82\83\8a\82ð\8am\95Û\82·\82é\82Æ\83o\83b\83t\83@\83I\81[\83o\81[\82ð\8bC\82É\82µ\82È\82\82Ä\82Í\82È\82ç\82È\82¢\82Ì\82Å
// SDK \82Í\8am\95Û\82³\82ê\82½\83\81\83\82\83\8a\82ð\95Ô\82·\90Ý\8cv
+ CreateResultString := GetProcAddress( module, 'CreateResultString' );
+ if not Assigned( @CreateResultString ) then
+ System.ExitCode := 1;
DisposeResultString := GetProcAddress( module, 'DisposeResultString' );
if not Assigned( @DisposeResultString ) then
System.ExitCode := 1;
- // ===== \83p\83X\8eæ\93¾\8aÖ\90\94
- // \91Î\89\9e\82µ\82Ä\82¢\82È\82¢\83p\83X\82Í\8bó\95¶\8e\9a\82ð\95Ô\82·\83_\83~\81[\82É\92u\82«\8a·\82¦\82é
- ApplicationFolder := GetProcAddress( module, 'ApplicationFolder' );
- if not Assigned( @ApplicationFolder ) then
- ApplicationFolder := @DummyPath;
- PreferencesFolder := GetProcAddress( module, 'PreferencesFolder' );
- if not Assigned( @PreferencesFolder ) then
- PreferencesFolder := @DummyPath;
- PreferencesFile := GetProcAddress( module, 'PreferencesFile' );
- if not Assigned( @PreferencesFile ) then
- PreferencesFile := @DummyPath;
- LogFolder := GetProcAddress( module, 'LogFolder' );
- if not Assigned( @LogFolder ) then
- LogFolder := @DummyPath;
- CSSFolder := GetProcAddress( module, 'CSSFolder' );
- if not Assigned( @CSSFolder ) then
- CSSFolder := @DummyPath;
- SkinFolder := GetProcAddress( module, 'SkinFolder' );
- if not Assigned( @SkinFolder ) then
- SkinFolder := @DummyPath;
- SkinFile := GetProcAddress( module, 'SkinFile' );
- if not Assigned( @SkinFile ) then
- SkinFile := @DummyPath;
- Download := GetProcAddress( module, 'InternalDownload' );
- if not Assigned( @Download ) then
- System.ExitCode := 1;
// ===== \82»\82Ì\91¼\95â\8f\95\8aÖ\90\94
- Abon := GetProcAddress( module, 'InternalAbon' );
- if not Assigned( @Abon ) then
+ InternalDownload := GetProcAddress( module, 'InternalDownload' );
+ if not Assigned( @InternalDownload ) then
+ System.ExitCode := 1;
+ InternalAbon := GetProcAddress( module, 'InternalAbon' );
+ if not Assigned( @InternalAbon ) then
System.ExitCode := 1;
- Skin := GetProcAddress( module, 'InternalSkin' );
- if not Assigned( @Skin ) then
+ InternalSkin := GetProcAddress( module, 'InternalSkin' );
+ if not Assigned( @InternalSkin ) then
System.ExitCode := 1;
end;