Forum Replies Created
-
AuthorPosts
-
June 29, 2009 at 5:53 am in reply to: [WinpkFilter 3.0.4.1] Failed to load helper driver (Delphi) #6746
after change every ‘char’ -> ‘ansiChar’, ‘string’ ->’ansiString’, ‘PChar’ ->’PAnsiChar’, now the ListAdapater sample runs.
C:Program FilesWinpkFiltersamplesDelphibin>ListAdapters.exe
1) WAN Network Interface (IP)
Internal Name: DEVICENDISWANIP
Current MAC: 000000000000
Medium: 0x00000003
Current MTU: 0
Current adapter mode: 0
2) Local Area Connection
Internal Name: DEVICE{9210E6AE-195F-4FBE-AA56-C1929254C9CD}
Current MAC: 00155830A804
Medium: 0x00000000
Current MTU: 1500
Current adapter mode: 0
3) Wireless Network Connection
Internal Name: DEVICE{F7A11532-EEC1-43FB-A8A3-453DB2C2BD6B}
Current MAC: 0013027B1097
Medium: 0x00000000
Current MTU: 1500
Current adapter mode: 0
Current system wide MTU decrement = 0
Default adapter startup mode = 0
But i ‘m not sure how did you guys treat unicode in other languages such as C#?
Since I’m planning to work with winpkf, I think I need to dig a bit more on unicode support.June 29, 2009 at 4:19 am in reply to: [WinpkFilter 3.0.4.1] Failed to load helper driver (Delphi) #6745I’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. -
AuthorPosts