Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class FSCRT_BSTR(Structure):
- _fields_ = [("str", c_char_p),
- ("len", c_uint)]
- def __init__(self, s=None):
- if type(s) is str:
- su8 = s.encode()
- self.str, self.len = c_char_p(su8), c_uint(len(su8))
- else:
- self.str, self.len = cast(create_string_buffer(s), c_char_p), c_uint(s)
- def text(self):
- if self.str:
- return self.str.decode()
- test = FSCRT_BSTR(1024)
- #FS_RESULT FSPDF_TextObject_GetUnicodeString(FSCRT_PAGE page, FSPDF_PAGEOBJECT textObj, FSCRT_BSTR * unicodeStr )
- print(hdll.FSPDF_TextObject_GetUnicodeString(Page, obj, byref(test)))
- ---------------
- print(hdll.FSPDF_TextObject_GetUnicodeString(Page, obj, byref(test)))
- OSError: exception: access violation reading 0x00000000019C2F68
Advertisement
Add Comment
Please, Sign In to add comment