I am not too sure this post landed in ARSLIST or not, so re-posting again...

Appajee


On Thu, Apr 22, 2010 at 12:42 PM, Appajee Papolu <[email protected]> wrote:

> Hi All,
>
> OK, yesterday I and David synced up (again) specifically about this topic
> this time.
>
> As David wrote, I have recently left BMC and taking some time off
> currently.
> [I will forward another note about my personal decision. Surprised I have
> not sent it to ARSLIST earlier].
>
> Coming to the specificis of .NET API -- yes, the code repository and the
> technical details are all handed off to BMC engineers. So, you should
> continue to seek out information/support from BMC and show your interest
> about this API. As its officially unsupported, you'll get whatever BMC
> chooses to give at its discretion.
>
> Thanks for the kind words Rick. Yes, I had been one of the strong
> proponents
> of this API (and similar API wrappers) **along with few other engineers**
> within the BMC engineering. So I am hopeful you will continue to get
> revisions/tips regarding these pieces.
>
> Now, finally about the original issue that started off this thread -- "I am
> getting (unknown/weird) casting error from int to object[]" or similar
> lines, around active link API accesses...
>
> This has all the symptoms of some funny assignment or a qualification
> within
> action list of your offending active link. Just to give a small backdrop --
> .NET API is a managed wrapper of raw C API unmanaged code. To keep this
> "plumbing" in a systematic way, the authors (well, me) chose to move
> managed
> data (from C# code) into an array of variants. Remember a variant can
> include primitives, strings etc as well as other arrays as well! So given
> any data structure, using this scheme, the .NET API converts it into a one
> dimensional variant array (elements of which can be some times arrays
> themselves to account for the nested nature of given structure). Well, at
> this point, this array is pushed down into the unmanaged layer, where a
> reverse-mapping occurs to convert this variant array into appropriate C
> data
> structure. As you can see, it is utterly critical that whatever is built
> from C# code side, must "align" perfectly into whatever C data structure
> you
> have!! For the most part they do -- as we as . NET API developers coded all
> of that. But, there may be cases where this is thrown off - due to a. bug
> in
> the .API code (mostly), b. funky situation of changed data structures or
> the
> values within members between API client and server versions (less likely
> but possible). I feel this is a .NET API bug (which is not probably
> encountered often due to the specific AL definition may not be that
> common(?) perhaps). At some point, in this variant array it got, it seems
> to
> have an integer primitive -- where as the code was expecting an object
> array
> (indicative of sub-structure object likely). There is a misalignment here
> between the data it has vs the variant array marshaling implementation.
>
> I think some action (most likely a Set/PushFields action has some thing
> funny in it, specifically the action assignment expressions side) is the
> culprit. May be a Macro or Ole Automation action, or perhaps SetFields
> action from remote form (or, advanced mode action with sample
> form/server)??
> I am just guessing here. If I can get a hand on the offending active link
> definition file (as DEF or preferably XML as I can read it better), I may
> be
> able to guess little bit more accurately.
>
> Any way, if you have further questions, feel free to ping me. I would love
> to help out, but be warned that I may not able to provide "support"
> (investigate/debug at code level  or find fix) as I do not have access to
> BMC assets any more. But hopefully we can figure out a workaround or
> exchange some useful info that I can share over the top of my head.
>
> HTH
> Appajee
> [email protected]
>

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
attend wwrug10 www.wwrug.com ARSlist: "Where the Answers Are"

Reply via email to