Home › Forums › Discussions › Support › [WinpkFilter 3.0.4.1] Failed to load helper driver (Delphi) › Re: Re: [WinpkFilter 3.0.4.1] Failed to load helper driver (Delphi)
June 29, 2009 at 4:19 am
#6745
I’ve located the problem.
Since Delphi 2009 using unicode in every place, now PChar need to be modify to PANSIChar when calling external DLLs.
so do not use ‘String’ (or PChar) parameters in DLLs at all. Use PAnsiChar instead.
As a fast test, I changed :
OpenFilterDriver: function(pszFileName : PChar): THANDLE; stdcall;
in winpkf.pas to
OpenFilterDriver: function(pszFileName : PANSIchar): THANDLE; stdcall;
and it works.
but the result is broken:
C:Program FilesWinpkFiltersamplesDelphibin>ListAdapters.exe
1) ??敎睴牯?湉整晲捡???
Internal Name: ?噅?居?卉??P
Current MAC: 000000000000
Medium: 0x00000000
Current MTU: 0
Current adapter mode: 0
2) 楗敲敬獳丠瑥潷歲?湯敮瑣潩nrk Connection
Internal Name: ?噅?居??????????????????終
Current MAC: 000000000000
Medium: 0x00000000
Current MTU: 0
Current adapter mode: 0
3) 楗敲敬獳丠瑥潷歲?湯敮瑣潩nrk Connection
Internal Name:
Current MAC: 000000000000
Medium: 0x00000000
Current MTU: 0
Current adapter mode: 0
Current system wide MTU decrement = 0
Default adapter startup mode = 0
C:Program FilesWinpkFiltersamplesDelphibin>
sure there are more modified should be made.
Would the developers please try test it in Delphi 2009? and it looks like a easy issue.
Delphi 2009 is the first usable version since D7, and I see lots of company have been shifted from D7 to D2009. I believe delphi is back.