Skip to main content

We have a function in a DLL.  Uniface calls C++ function, which calls a COM wrapper to a .Net (C#) function.  The C# function returns an Int64 (cast as a long) back to the COM wrapper.  This is no longer working when we compiled in 9.7.  I can see the value in the C# (for example 4551), but when it gets back to the COM wrapper it is 0, implying some data type mismatch.  I could not find any documentation but looking in the include files I see comments about UPLONG and 64 bit apps ... but I can't get our DLL to work in 32 bit let alone 64 bit.

We have a function in a DLL.  Uniface calls C++ function, which calls a COM wrapper to a .Net (C#) function.  The C# function returns an Int64 (cast as a long) back to the COM wrapper.  This is no longer working when we compiled in 9.7.  I can see the value in the C# (for example 4551), but when it gets back to the COM wrapper it is 0, implying some data type mismatch.  I could not find any documentation but looking in the include files I see comments about UPLONG and 64 bit apps ... but I can't get our DLL to work in 32 bit let alone 64 bit.

Dear Joanne,

Not sure if this issue is still is current.

I assume that you've created the C++ COM wrapper, correct? If that's the case then I don't really see the connection here to Uniface. Or are you using a Uniface 3GL function that does not return the expected result? Also, are you really sure that the COM wrapper can correctly receive the return value from the C# function? Is it not possible that the cast (somehow) causes a truncation. Any clues when compiling the DLL with warning level 4?

Also, which Visual Studio are you using to create the DLL? With version 9.7.05 we've upgraded Uniface from Visual C++ 2005 to 2015. In case you've changed the Visual Studio version as well then maybe this explains the change in behavior?

Sorry, it seems that I only can raise more questions here than I actually can answer.

I hope this helps (somehow).

Kind regards,
Daniel