I should add that every once in while when I build for debugging, I get a message warning me that: "The project is out of date. FastMath - Debug Win 32". Could the problems I'm having be something other that a coding problem? Something that goes wrong when building or something?
No I suspected it could have something to do with me not linking well the two projects so I even built it all in one same project...included header and source files of my FMatrix class in the Test app and removed any linking to the dlls...just compiled it as one console app. I still got the same error and I still couldn't catch it with the debugger step by step.
I'm giving up, at least today. Thanks for all the help.
Ok Christian, thanks for all the help but I managed to track down the error. Must of had some other bug I fixed before when I tried to compile everything under the same project because otherwise it should have worked.
The thing is that in the FMatrix.h header file included in the Test project I wasn't including the private definitions. I thought that the header acted more like an interface than anything else and thus private members were not needed.
Once I included the private definitios in the FMatrix.h header file inside the Test app the problem disappeared.
(An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified).
The C++/CLI wrapper method will be accessed from C# as follows:
string x="some value", y="another value", z="a third value";
managed.ManagedMethod( x, y, z );
The problem I am having is converting the managed string handle (String^ y) to an unmanaged VARIANT parameter. I would like to be able to solve this problem without having to modify the unmanaged C++ code. Does anyone have any suggestions or ideas on how to do this?
Sure but my level of apathy for people writing production code that can't blow their own nose is fairly high today.
I feel like starting a new CodeProject account with the user name "HellNo" for replying to all the "can you provide the code" lovelies. Or maybe I shoudl write a programming book titled "Copy Paste for Idiots"... wait...
Copy the following code and paste it into your code file at the appropriate location:
<code>int n = 11;</code>
Now modify the code until it produces the desired results.
There finished... now all I need is to send it off to a publisher.
could you provide some sample code of how to do this? I thought of doing that, but I couldn't get it to work.
Since you've already written code to convert String^ to BSTR, I presume your problem is with converting that to a VARIANT. To do that, you can use _variant_t which has a constructor that takes a BSTR, and use that. You can pass _variant_t anywhere a VARIANT is expected.