Hi,
i am c# beginner and also have no experience with ADL, so i hope this question is not too silly.
I tried to extend the ADL C# Sample ( Sample-Managed ) with the ADL Function ADL_Display_EdidData_Get. Therefore I also implemented ADLDisplayEDIDData struct, which is in the ADL.cs and looks like:
[StructLayout(LayoutKind.Sequential)]
internal struct ADLDisplayEDIDData
{
internal int Size;
internal int Flag;
internal int EDIDSize;
internal int BlockIndex;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = (int)ADL.ADL_MAX_PATH)]
internal string EDIDData;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
internal int[] Reserved;
}
In Program.cs i tried this:
if(null != ADL.ADL_Display_EdidData_Get){
ADLDisplayEDIDData EDIDData = new ADLDisplayEDIDData();
IntPtr EDIDBuffer = IntPtr.Zero;
int sizee = Marshal.SizeOf(EDIDData);
EDIDBuffer = Marshal.AllocCoTaskMem((int)sizee);
Marshal.StructureToPtr(EDIDData, EDIDBuffer, false);
ADLRet = ADL.ADL_Display_EdidData_Get(0, 5, ref EDIDBuffer);
Console.WriteLine("ADLRet: "+ADLRet);
if (ADL.ADL_SUCCESS == ADLRet)
{
Console.WriteLine("success");
}
else
{
Console.WriteLine("no success");
}
}
ADLRet is always -3, which means:
#define | ADL_ERR_INVALID_PARAM -3 |
One of the parameter passed is invalid. |
so i guess either the green part is wrong or something in the ADLDisplayEDIDData struct is incorrect. I append the visual studio 2010 project to this post. Would be very nice, if one can help me out.
still struggle with this problem
really need a hint how to go on with this.
No way , try your luck in the following websites , www.codeproject.com , www.c-sharpcorner.com, http://csharp.net-informations.com , www.java2s.com . Hope you will get answer from any of these websites.
rampt.
I am in the same situation, and have been unable to find any help or samples online. Has any progress been made on this issue? If so, can an explanation or sample code be provided?
Thank you.
Have anyone some new information for this problem? would need some help !