CryptoSys PKI Toolkit Manual

PKI_ModuleName

Retrieves the name of the current process's module.

VB6/VBA Syntax

Public Declare Function PKI_ModuleName Lib "diCrPKI.dll" (ByVal strName As String, ByVal nStrLen As Long, ByVal nOptions As Long) As Long

nRet = PKI_ModuleName(strName, nStrLen, 0)

Parameters

strName
[out] String to receive the name of the module.
nStrLen
[in] Long specifying the maximum length of the string to be copied.
nOptions
[in] Long option flags: not used in this release. Specify zero.

C/C++ Syntax

long _stdcall PKI_ModuleName(char *szOutput, long nOutputLen, long reserved);

Returns (VB6/C)

Long: If successful, the return value is the number of characters in the output string; otherwise it returns a negative error code.

.NET Equivalent

General.ModuleName Method

Remarks

Example

    Dim nLen As Long
    Dim strModuleName As String

    nLen = PKI_ModuleName("", 0, 0)
    If nLen > 0 Then
        strModuleName = String(nLen, " ")
        nLen = PKI_ModuleName(strModuleName, nLen, 0)
        strModuleName = Left(strModuleName, nLen)
        Debug.Print "PKI_ModuleName returns " & nLen & " [" & strModuleName & "]"
    Else
        Debug.Print "Error " & nLen & " with PKI_ModuleName"
    End If

On our W2000 system, this produces the output:

PKI_ModuleName returns 29 [C:\WINNT\system32\diCrPKI.dll]

See Also

[Contents] [Index]

[HOME]   [NEXT: PKI_PowerUpTests...]

Copyright © 2004-12 D.I. Management Services Pty Ltd. All rights reserved.