Skip to content

Commit

Permalink
Fix for PDF jump (at least on Windows)
Browse files Browse the repository at this point in the history
Strings in p3k are unicode by design.
  • Loading branch information
z-m-k committed Apr 5, 2013
1 parent 710eead commit 6191911
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions DDEExecute.py
Expand Up @@ -34,8 +34,7 @@ def py_mycallback(uType, uFmt, hconv, hsz1, hsz2, hdata, dwData1, dwData2):
# server and topic names, as LPTSTR = wchar * # server and topic names, as LPTSTR = wchar *
service = c_wchar_p(service) service = c_wchar_p(service)
topic = c_wchar_p(topic) topic = c_wchar_p(topic)
encCommand = command.encode("utf-8") pData = c_char_p(command)
pData = c_char_p(encCommand)
cbData = len(command)+1 # Important! Zero-terminated! cbData = len(command)+1 # Important! Zero-terminated!


# initialize # initialize
Expand Down Expand Up @@ -67,4 +66,4 @@ def py_mycallback(uType, uFmt, hconv, hsz1, hsz2, hdata, dwData1, dwData2):
DdeFreeStringHandle(idInst, hszService) DdeFreeStringHandle(idInst, hszService)
DdeDisconnect(hConv) DdeDisconnect(hConv)
DdeUninitialize(idInst) DdeUninitialize(idInst)


0 comments on commit 6191911

Please sign in to comment.