Visual c++ 是否可以在Windows应用商店应用程序中加载c库?

Visual c++ 是否可以在Windows应用商店应用程序中加载c库?,visual-c++,dllimport,windows-store-apps,Visual C++,Dllimport,Windows Store Apps,是否可以在Windows应用商店应用程序中加载c库?如果是,请告诉我如何加载。我的代码如下 [DllImport("gsdll32.dll", EntryPoint = "gsapi_new_instance")] private static extern int gsapi_new_instance(out IntPtr pinstance, IntPtr caller_handle); 我在PDFconverter类中声明如下 [DllImport("gsdll32.dll", Entr

是否可以在Windows应用商店应用程序中加载c库?如果是,请告诉我如何加载。我的代码如下

[DllImport("gsdll32.dll", EntryPoint = "gsapi_new_instance")]
private static extern int gsapi_new_instance(out IntPtr pinstance, IntPtr caller_handle);
我在PDFconverter类中声明如下

[DllImport("gsdll32.dll", EntryPoint = "gsapi_new_instance")]
private static extern int gsapi_new_instance(out IntPtr pinstance, IntPtr caller_handle);
访问类如下所示:

PDFConvert converter = new PDFConvert();
converter.Convert(inputpath, outputpath);

当然有可能。您只需要编写一个代理dll。或者,您可以将程序附加到进程,并插入一些代码来加载dll文件。这是我的黑客行为。你想做什么?非常感谢你的回复。我正在尝试从Metro样式的应用程序加载Ghostscript库。该库正在将pdf转换为图像。我已经尝试加载,但没有成功。如果有办法加载库。请告诉我如何加载。添加代码。。。你到底试了什么?你好Rekire,这两个链接[告诉我Win32 library不能在WinRt中使用。但是你回答我是的。如果是,我如何引用,请向我解释。你得到的错误是什么?它应该可以工作。在WinRt中,他们必须加载PackagedLibrary函数来替换loadlibrary/loadlibraryex,但它的工作原理基本相同。对于使用dllimport的托管代码应该可以。什么你得到的错误是什么?