-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cant not package with fody ? #42
Comments
Hello @laomms, please raise a bug at fody. Kind regards |
I mean these two dlls cannot be packaged by fody into a single file, must exist in the folder directory ? |
when call 64bit unmanaged dll in 32bit application, if have pointer related.it will thrown exception: An IntPtr or UIntPtr with an eight byte value cannot be deserialized on a machine with a four byte word size. public interface pkeyhelper64Dll : IDisposable
{
[LegacyDllMethod(CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
uint GetEditionNameFromId(uint EditionId, out IntPtr EditionName);
}
class Program
{
static IWrapperConfig _configuration = WrapperConfigBuilder.Create().TargetArchitecture(TargetArchitecture.Amd64).Build();
public static void Main(string[] args)
{
IntPtr EditionName;
using (var client = WrapperProxyFactory<pkeyhelper64Dll>.GetInstance(_configuration))
{
var hResult = client.GetEditionNameFromId(0x30, out EditionName);
if (hResult == 0)
{
Console.WriteLine(Marshal.PtrToStringAnsi( EditionName));
}
}
Console.Read();
}
} |
This issue is not related to LegacyWrapper, please raise an issue at fody. |
You have declared your out parameter as IntPtr, which is 32 bit wide on your system. The dll will return a pointer that is 64 bit wide. This cannot work this way. |
As I don't know how your DLL is built, this would be a nice question for StackOverflow. |
this is a windows system dll. call normally under 64 bit assembly:
|
Have you tried using |
I have tried every type. |
LegacyWrapper.dll, LegacyWrapper.Common.dll... can not embedded by fody ?
if embedded by fody, call exception: The system can't find the specify File
The text was updated successfully, but these errors were encountered: