Sign in to follow this  

C++/CLI.NET and Crypto++ problem

This topic is 3723 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does anyone used Crypto++ (C++ crypthology library ) with C++/CLI.net.I couldn't use it with C++/CLI.net (with C++ everything is ok ).I dynamically build a Crypto++ dll and linked it to the Visual Studio project.I successfully compiled and run the project.But program outputs a messagebox saying "The applicaiton failed to initialize properly(0xc00000005).Click on OK to terminate the application" and fails to start... Do anyone knows why?why can not i use my so-called native dll with C++/CLI.net.

Share this post


Link to post
Share on other sites
No, I mean something like this:

[StructLayout (LayoutKind::Sequential, CharSet = CharSet::Auto)]
public value class LOGFONT
{
public:
int lfHeight;
int lfWidth;
int lfEscapement;
int lfOrientation;
int lfWeight;
[MarshalAs(UnmanagedType::U1)]
bool lfItalic;
[MarshalAs(UnmanagedType::U1)]
bool lfUnderline;
[MarshalAs(UnmanagedType::U1)]
bool lfStrikeOut;
unsigned char lfCharSet;
unsigned char lfOutPrecision;
unsigned char lfClipPrecision;
unsigned char lfQuality;
unsigned char lfPitchAndFamily;
[MarshalAs(UnmanagedType::ByValTStr, SizeConst = 32)]
String ^lfFaceName;
};

which describes the structure layout for data passed between managed and unmanaged code. If there's a difference in the memory layout, odd things can happen.

Skizz

Share this post


Link to post
Share on other sites

This topic is 3723 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this