Answered by:
reuse (.dll) and (.lib) files in HTML5/WinJS project

Question
-
Hi ,
I have (.dll) and (.lib) files developed using windows store cpp. They are not windows runtime components. I want to use these files/projects in my HTML5/JavaScript Windows store app.
Can any one tell me the process how to achieve the above .
Thank You
Monday, April 29, 2013 6:39 AM
Answers
-
Hello,
You cannot link directly against .lib files from any managed language such as JavaScript. You can load DLLs from managed languages but in a Windows Store app your libraries must be either a WinRT component or a CLR component (only with C# and VB). You can load standard DLLs and COM objects from C++. Depending on the .lib format you may or may not be able to load the library in C++.
I hope this helps,
James
Windows SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/
- Proposed as answer by James Dailey - MSFTMicrosoft employee, Moderator Tuesday, April 30, 2013 1:15 AM
- Marked as answer by Jesse Jiang Tuesday, May 7, 2013 6:30 AM
Tuesday, April 30, 2013 1:15 AMModerator -
Hi,
You can follow this document to do this
http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh755833.aspxAnd this sample codes
http://code.msdn.microsoft.com/windowsapps/Hybrid-JavaScript-and-C-e6dc77fa/Best regards,
JesseJesse Jiang
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.- Proposed as answer by Jesse Jiang Monday, May 6, 2013 7:14 AM
- Marked as answer by Jesse Jiang Tuesday, May 7, 2013 6:30 AM
Thursday, May 2, 2013 2:11 AM
All replies
-
Hello,
You cannot link directly against .lib files from any managed language such as JavaScript. You can load DLLs from managed languages but in a Windows Store app your libraries must be either a WinRT component or a CLR component (only with C# and VB). You can load standard DLLs and COM objects from C++. Depending on the .lib format you may or may not be able to load the library in C++.
I hope this helps,
James
Windows SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/
- Proposed as answer by James Dailey - MSFTMicrosoft employee, Moderator Tuesday, April 30, 2013 1:15 AM
- Marked as answer by Jesse Jiang Tuesday, May 7, 2013 6:30 AM
Tuesday, April 30, 2013 1:15 AMModerator -
James,
So leaving about .lib files. I have .dll in c++. Cant I make a wrapper for that .dll using winRT component.
I am unable to link that .dll to winRT component.
Can you please provide any solution how can I use .dll(c++) in my JAVASCRIPT windows store app ..
Thanks in Advance ...
Tuesday, April 30, 2013 6:02 AM -
Hi,
You can follow this document to do this
http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh755833.aspxAnd this sample codes
http://code.msdn.microsoft.com/windowsapps/Hybrid-JavaScript-and-C-e6dc77fa/Best regards,
JesseJesse Jiang
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.- Proposed as answer by Jesse Jiang Monday, May 6, 2013 7:14 AM
- Marked as answer by Jesse Jiang Tuesday, May 7, 2013 6:30 AM
Thursday, May 2, 2013 2:11 AM