Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b310cfeda2 | ||
|
|
07cd855446 |
@@ -77,6 +77,7 @@ namespace v2rayN.Handler
|
|||||||
{
|
{
|
||||||
AbsoluteCompleted(this, new ResultEventArgs(false, "Already the latest version"));
|
AbsoluteCompleted(this, new ResultEventArgs(false, "Already the latest version"));
|
||||||
}
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
string url = string.Format(nUrl, version);
|
string url = string.Format(nUrl, version);
|
||||||
|
|||||||
@@ -69,15 +69,23 @@ namespace v2rayN.HttpProxyHandler
|
|||||||
IntPtr optionsPtr = Marshal.AllocCoTaskMem(optSize * options.Length);
|
IntPtr optionsPtr = Marshal.AllocCoTaskMem(optSize * options.Length);
|
||||||
// copy the array over into that spot in memory ...
|
// copy the array over into that spot in memory ...
|
||||||
for (int i = 0; i < options.Length; ++i)
|
for (int i = 0; i < options.Length; ++i)
|
||||||
|
{
|
||||||
|
if (Environment.Is64BitOperatingSystem)
|
||||||
|
{
|
||||||
|
IntPtr opt = new IntPtr(optionsPtr.ToInt64() + (i * optSize));
|
||||||
|
Marshal.StructureToPtr(options[i], opt, false);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
IntPtr opt = new IntPtr(optionsPtr.ToInt32() + (i * optSize));
|
IntPtr opt = new IntPtr(optionsPtr.ToInt32() + (i * optSize));
|
||||||
Marshal.StructureToPtr(options[i], opt, false);
|
Marshal.StructureToPtr(options[i], opt, false);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
list.options = optionsPtr;
|
list.options = optionsPtr;i
|
||||||
|
|
||||||
// and then make a pointer out of the whole list
|
// and then make a pointer out of the whole list
|
||||||
IntPtr ipcoListPtr = Marshal.AllocCoTaskMem((Int32)list.dwSize);
|
IntPtr ipcoListPtr = Marshal.AllocCoTaskMem((int)list.dwSize);
|
||||||
Marshal.StructureToPtr(list, ipcoListPtr, false);
|
Marshal.StructureToPtr(list, ipcoListPtr, false);
|
||||||
|
|
||||||
// and finally, call the API method!
|
// and finally, call the API method!
|
||||||
|
|||||||
Reference in New Issue
Block a user