src/mdlldk/tools

Search:
Group by:
Source   Edit  

Provides some procedures to facilitate the development of dlls for mIRC.

Procs

proc initTools(info: ptr LoadInfo; keepLoaded, strUnicode: bool) {....raises: [],
    tags: [], forbids: [].}
Initializes the variables that are used in the functionality procedures of this module. Must be called in the LoadDll() function. Is called automatically by the addLoadProc() template. Source   Edit  
proc mBeta(): int {.inline, ...raises: [], tags: [], forbids: [].}
Returns the beta version of mIRC. Returns -1 if unable to determine and 0 if it is not a beta version. Source   Edit  
proc mInitialized(): bool {.inline, ...raises: [], tags: [], forbids: [].}
Returns true if the dll was loaded by the template addLoadProc() or if the procedure initTools() was called. Source   Edit  
proc mKeepLoaded(): bool {.inline, ...raises: [], tags: [], forbids: [].}
Returns true if mIRC will keep the dll loaded after the call. If it returns false mIRC will unload the dll after the call. Source   Edit  
proc mMainWindowHandle(): HWND {.inline, ...raises: [], tags: [], forbids: [].}
Returns a HWND for the identifier of the main window of mIRC. The HWND type is an alias for int. Source   Edit  
proc mMajor(): int {.inline, ...raises: [], tags: [], forbids: [].}
Returns the fixed major version of mIRC. Returns -1 if unable to determine. Source   Edit  
proc mMaxBytes(): int {.inline, ...raises: [], tags: [], forbids: [].}
Returns the size, in bytes, allocated in the pointers to the data and parms parameters. Source   Edit  
proc mMinor(): int {.inline, ...raises: [], tags: [], forbids: [].}
Returns the fixed minor version of mIRC. Returns -1 if unable to determine. Source   Edit  
proc mRawVersion(): uint32 {.inline, ...raises: [], tags: [], forbids: [].}

Returns a uint32 with the raw version passed by mIRC, in the mVersion field, of the LoadInfo object, when loading the dll.

It is recommended to use the mMajor() and mMinor().

Source   Edit  
proc mToCStringAndCopy(dest: pointer | cstring; source: string)
Transforms source to cstring and copies it to dest up to the byte limit of mMaxBytes(). Source   Edit  
proc mToWideCStringAndCopy(dest: pointer | WideCString; source: string)
Transforms source into WideCString and copies it to dest up to the byte limit of mMaxBytes(). Source   Edit  
proc mUnicode(): bool {.inline, ...raises: [], tags: [], forbids: [].}
Returns true if the communication between mIRC and the dll will be via unicode strings (WideCString). If it returns false the communication will be by ANSI C strings. Source   Edit