Retrieves the name of the current process's module.
Public Declare Function API_ModuleName Lib "diCryptoSys.dll"
(ByVal strModuleName As String, ByVal nMaxChars As Long, ByVal nOptions As Long) As Long
nRet = API_ModuleName(strName, nStrLen, 0)
long __stdcall API_ModuleName(char *szOutput, long nMaxChars, long nOptions);
If successful, the return value is the number of characters in the output string; otherwise it returns a negative error code.
Public Function apiModuleName
(Optional nOptions As Long = 0) As String
gen.ModuleName
Public Function ModuleName() As String
See gen.ModuleName
.
static std::string crsysapi::Gen::ModuleName ()
static std::string crsysapi::Gen::Platform ()
static Gen.module_name()
For the "raw" VBA/C function, the user must allocate an output string buffer szOutput of the required length. Specify a zero nOutChars or an empty string for szOutput to find the required length of the output string. C/C++ users must add one to this value when allocating memory.
Dim nChars As Long Dim strModuleName As String nChars = API_ModuleName("", 0, 0) Debug.Assert nChars > 0 strModuleName = String(nChars, " ") nChars = API_ModuleName(strModuleName, nChars, 0) Debug.Print strModuleName ' C:\WINDOWS\SYSTEM32\diCryptoSys.dll
Debug.Print "ModuleName= " & apiModuleName()