mirror of
https://github.com/modernw/App-Installer-For-Windows-8.x-Reset.git
synced 2026-04-23 19:40:23 +10:00
Organized the project files.
And also fixed some bugs.
This commit is contained in:
19
priformatcli/prifile.h
Normal file
19
priformatcli/prifile.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
#using "./PriFileFormat.dll"
|
||||
using namespace PriFileFormat;
|
||||
#include <comip.h>
|
||||
#include <atlbase.h>
|
||||
#include <atlsafe.h>
|
||||
#include <objidl.h>
|
||||
#include <msclr/marshal.h>
|
||||
#include <msclr/gcroot.h>
|
||||
System::Runtime::InteropServices::ComTypes::IStream ^ComIStreamToCliIStream (IStream *pNativeStream)
|
||||
{
|
||||
if (pNativeStream == nullptr) throw gcnew System::ArgumentNullException ("pNativeStream");
|
||||
pNativeStream->AddRef ();
|
||||
System::IntPtr ptr (pNativeStream);
|
||||
// ½« IUnknown ת»»ÎªÍÐ¹Ü IStream
|
||||
System::Object ^obj = System::Runtime::InteropServices::Marshal::GetObjectForIUnknown (ptr);
|
||||
// ·µ»ØÎª ComTypes::IStream^
|
||||
return (System::Runtime::InteropServices::ComTypes::IStream ^)obj;
|
||||
}
|
||||
Reference in New Issue
Block a user