Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PortableDeviceAPI : "[ERROR] Unable to handle the type" #82

Open
AlainCo opened this issue Aug 22, 2019 · 0 comments
Open

PortableDeviceAPI : "[ERROR] Unable to handle the type" #82

AlainCo opened this issue Aug 22, 2019 · 0 comments

Comments

@AlainCo
Copy link

AlainCo commented Aug 22, 2019

Hi,
I'm beginner with COM/COM4J, trying to map WPD/PortableDeviceAPI.
<libId>1F001332-1A57-4934-BE31-AFFC99F4EE0A</libId>
I get many error messages "[ERROR] Unable to handle the type "... and some required methods a re not mapped.
the missing types are :

  • _ULARGE_INTEGER
  • _FILETIME
  • LPWSTR*
  • _tagpropertykey
  • tag_inner_PROPVARIANT
  • tagSTATSTG
  • tagRemSNB
  • tagTYPEATTR
  • tagFUNCDESC
  • tagVARDESC
  • tagTLIBATTR

I imagine i should add some mapping, in the generator? as libraries?
Is there some procedure? some example? that I could follow ...

I work with maven, using the plugin maven-com4j-plugin:2.1, and I've added dependencies on all I could find like org.jvnet.com4j:com4j:2.1 org.jvnet.com4j:ado20:1.0 org.jvnet.com4j:active-directory:1.0

Is there more recent version to use?

EDIT: I've fetched the latest release. No change. (Nb: I've corrected some minor build problems locally....)
I've look at the code and found where the error message is sent: in com4j.tlbimp.TypeBinding.bind(Generator, IType, String).

It seems that the _tagpropertykey,_FILETIME, like probably all tagXXX are C/C++ Struct...
_ULARGE_INTEGER is a 64bit word implemented as struct too.
tag_inner_PROPVARIANT is a union of struct
Is there a way to map them into java ? (Maybe mapping as byte buffer, and reading fields one by one with basic math operators) ? of through opaque pointer and generic C/C++ accessors?

the LPWSTR* seems a different problem... as I understand it should be mapped to an array of string, terminated by null pointer.

I could probably help to implement mapping, but I need supervision by expert.

Best regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant