Can't find DLL entry point OpenEventLog in advapi32.dll 
Author Message
 Can't find DLL entry point OpenEventLog in advapi32.dll

I'm trying to open the event log file. I used the API declaration in the
WIN32API.TXT coming with VB5. My OS is NT 4.0 Sp 3 with VB5 sp3.

This is my function:

Declare Function OpenEventLog Lib "advapi32.dll" (ByVal lpUNCServerName As
String, ByVal lpSourceName As String) As Long

My ADVAPI32.DLL version is 4.0

This is my VB code:

Private Sub Form_Load()
  Dim lEventLogHnd As Long
  Dim sEventLog As String

  sEventLog = "QCQVCL" & &H0
  lEventLogHnd = OpenEventLog(sEventLog, "Application")

  CloseEventLog (lEventLogHnd)
End Sub



Mon, 02 Jul 2001 03:00:00 GMT  
 Can't find DLL entry point OpenEventLog in advapi32.dll

|I'm trying to open the event log file. I used the API declaration in
the
|WIN32API.TXT coming with VB5. My OS is NT 4.0 Sp 3 with VB5 sp3.
|
|This is my function:
|
|Declare Function OpenEventLog Lib "advapi32.dll" (ByVal
lpUNCServerName As
|String, ByVal lpSourceName As String) As Long
|
This API is implemented as Ansi or Unicode. So try something like:

Private Declare Function OpenEventLog Lib "advapi32" _
   Alias "OpenEventLogA" (ByVal lpUNCServerName As String, _
   ByVal lpEventSourceName As String) As Long

...for Ansi.

...and something like:

Private Declare Function OpenEventLog Lib "advapi32" _
   Alias "OpenEventLogW" (ByVal lpUNCServerName As String, _
   ByVal lpEventSourceName As String) As Long

..for Unicode

HTH

;-) Cool
Hasta Luego
Adrian Maull [MCSD]



Mon, 02 Jul 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. VB5 DLL function / Can't find DLL entry point

2. dll creation problem: can't find dll entry point

3. VB5 DLL Error - Can't Find Entry Point in ...dll

4. dll creation problem: can't find dll entry point

5. VB5 DLL Error - Can't Find Entry Point in ...dll

6. Can't find DLL entry point NetGetDCName in netapi32.dll

7. Can't find DLL entry point NetRemoteTOD in NETAPI32.DLL

8. VB can't find entry point in VC++ DLL

9. Can't find DLL entry-point ...??

10. VB Can't Find DLL Entry Point

11. Can't find DLL Entry point ExitWindows in user32

12. Newbie Question: Can't find DLL entry point

 

 
Powered by phpBB® Forum Software