Click here to Skip to main content
15,892,281 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
This is starting to do my head in. I want to build an App to do some minor control stuff using a USB attached board I've used for ages. All I need to do is include a library (Win32) that is used to send commands.

I have the win 8 app building fine. I then add the extern "C" functions for the stuff in the DLLs and a call to one of them. Predictably fails with a link error. I add this dll to the folder and the .lib to the project all compiles fine but when I run it I get an "unable to activate windows store app 'lskdfjlsdf uuid stuff ' The process started but the activation request failed with error the application didn't start.

Helpfully the eventvwr contains the same reason for the application not starting. If I take the .lib out of the list to link and remove the call to an on dll function all works okay.

Apart from the fact this is massively unfriendly I have no idea why this doesn't work. I suspect it is something to do with RT? I've tested this working in C++ under the desktop version, but under the modern ui version no dice :-(

Anyone got an idea?

Trevor
Posted
Comments
Sergey Alexandrovich Kryukov 15-Apr-14 17:20pm    
Not clear at all. Not enough information. Perhaps some code samples could help...
—SA

1 solution

Hi Sergey

Okay. I'm not at home with the code but let me try and explain without.

I have a win32 dll that I wish to use functions from.

Using Visual Studio express 2013 I have created a windows 8 directx(xaml) app.

To that App I have added a class USBControl.

in USBControl.h I have added some extern statements something like the following

extern "c"
{
__declspec(dllimport) int somefuntion(int input);
}

As yet I have done nothing to fill out the class further as I have been unable to get the application so far running. This is planned to be the base of the overall operations for these imported functions.

I added to the project directories the dll in which the function lies and a .lib file that has the exports in it.

I added the .lib file to the linker additional libraries.

If I now compile the code it builds and runs perfectly.

If however I add a call to somefunction(0) anyway in the code the app compiles perfectly but fails to run with the error message "unable to activate windows store app" {a load of stuff including a guid of some sort} "error the application didn't start".

Presumably this is occuring when the app tries to run the code in the dll (though I will do something tonight to verify this).

If feels like the code in the dll cannot be run by the app. All links okay but when executed it causes a failure and a none to informative MS error message.

Hope this makes it clearer.

Trevor
 
Share this answer
 
Comments
vaxluk 4-Mar-15 1:45am    
Hi Trevor,
Do you have a solution for your issue?
I have faced with the same error in the similar scenario.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900