Jump to content
Excelsior Forums

will592

Members
  • Content count

    0
  • Joined

  • Last visited

    Never

Community Reputation

0 Neutral

About will592

  • Rank
    Newbie
  • Birthday 01/01/01
  1. reference to unknown Struct

    Still wasn't able to get it to work. The function returns a value that indicates it does not like the arguments being passed in. Should the CSTRING that I am passing be a container for the struct itself or just a pointer to it? The function only needs to be passed a pointer... it would seem that I should be able to just create a generic Pointer object and pass it around regardless of what it is pointing too...I never need to deref it inside my code. I have sent the DLL and some of my code to your Support Dept., I hope that it will be enough for someone to point out my (hopefully) silly mistake. Thanks, Chris
  2. reference to unknown Struct

    Perhaps I misunderstood your response...but I tried to do this and it still isn't working. When I pass in the CSTRING argument the function returns successfully, but anytime I try to pass that argument back as the pointer to the structure I get an invalid parameter value message (from my dll). After I invoke the function, should the Argument that I passed in contain the pointer or do I have to manipulate it somehow to create a pointer to the object? Thanks in advance, Chris
  3. reference to unknown Struct

    I am very new to this and have what may be a stupid question. I am trying to call a function from a c library (dll) and having a little trouble figuring something out. One of the arguments that is passed into the function is a pointer to a internal struct that I know nothing about. I am not a C programmer (or at least not a very good one...this much should be obvious). I never need to dereference the pointer in my code, only pass the pointer back into several other functions in the DLL. Basically it looks something like this ( Where newStruc is the struct that I don't know anything about and therefore don't know how to define in Java but exists in the DLL) Structure newStruc = new GeoHandleStruct(); Pointer pGeoEngHandle = Pointer.createPointerTo(newStruc); xFunction geoEngInit=new xFunction("Mm32v8","short GeoEngCheckDbAvailability(CSTRING, CSTRING, CSTRING, short*, newStruc *)"); geoEngInit.invoke(searchPath, db_name, user_dict, dbInitRequestFlags, pGeoEngHandle); Next I would want to take the pointer that was returned from the previous method call and pass it into some other method such as: xFunction geoEngGetCfgParms=new xFunction("Mm32v8","short GeoEngGetCfgParms(newStruc *, someOtherStruc *)"); geoEngGetCfgParms.invoke(pGeoEngHandle, someOtherStrucArgument); and so on and so forth. Can anyone help? Sorry if this is a stupid question. Thanks, Chris
×