Click here to Skip to main content
15,892,517 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: source code Pin
Richard MacCutchan2-Apr-13 9:19
mveRichard MacCutchan2-Apr-13 9:19 
GeneralRe: source code Pin
Captain Price2-Apr-13 17:02
professionalCaptain Price2-Apr-13 17:02 
QuestionRe: source code Pin
David Crow2-Apr-13 10:34
David Crow2-Apr-13 10:34 
AnswerRe: source code Pin
Peter_in_27802-Apr-13 10:57
professionalPeter_in_27802-Apr-13 10:57 
GeneralRe: source code Pin
Captain Price2-Apr-13 17:04
professionalCaptain Price2-Apr-13 17:04 
AnswerRe: source code Pin
Erudite_Eric3-Apr-13 3:38
Erudite_Eric3-Apr-13 3:38 
QuestionICredentialProviderFilter Pin
venkatesh528672-Apr-13 1:59
venkatesh528672-Apr-13 1:59 
QuestionTesting my first C driver Pin
candogu2-Apr-13 1:44
candogu2-Apr-13 1:44 
AnswerRe: Testing my first C driver Pin
Richard MacCutchan2-Apr-13 1:53
mveRichard MacCutchan2-Apr-13 1:53 
GeneralRe: Testing my first C driver Pin
candogu2-Apr-13 1:58
candogu2-Apr-13 1:58 
QuestionRe: Testing my first C driver Pin
Richard MacCutchan2-Apr-13 2:16
mveRichard MacCutchan2-Apr-13 2:16 
AnswerRe: Testing my first C driver Pin
candogu2-Apr-13 2:22
candogu2-Apr-13 2:22 
GeneralRe: Testing my first C driver Pin
Richard MacCutchan2-Apr-13 2:30
mveRichard MacCutchan2-Apr-13 2:30 
GeneralRe: Testing my first C driver Pin
Erudite_Eric3-Apr-13 0:46
Erudite_Eric3-Apr-13 0:46 
GeneralRe: Testing my first C driver Pin
Jochen Arndt2-Apr-13 3:05
professionalJochen Arndt2-Apr-13 3:05 
GeneralRe: Testing my first C driver Pin
Erudite_Eric3-Apr-13 3:34
Erudite_Eric3-Apr-13 3:34 
QuestionRe: Testing my first C driver Pin
David Crow2-Apr-13 4:34
David Crow2-Apr-13 4:34 
AnswerRe: Testing my first C driver Pin
Erudite_Eric3-Apr-13 0:45
Erudite_Eric3-Apr-13 0:45 
AnswerRe: Testing my first C driver Pin
Erudite_Eric3-Apr-13 0:58
Erudite_Eric3-Apr-13 0:58 
Questioncode conversion MATLAB to c Pin
Member 99587781-Apr-13 21:12
Member 99587781-Apr-13 21:12 
AnswerRe: code conversion MATLAB to c Pin
Chris Losinger2-Apr-13 7:49
professionalChris Losinger2-Apr-13 7:49 
QuestionAccessing Win32 APIs from WinRT app through Win32 Dll Pin
msr_codeproject1-Apr-13 4:21
msr_codeproject1-Apr-13 4:21 
Hi, I am trying to call Win32 API from Windows Store App. Since Win32 APIs can not be accessed from WinRT, I have written a Win32 Dll and exposed a function.

I am trying to call this function from WinRT App. But I am getting 'Access Denied' Error.

Dll Code:

C++
extern "C" __declspec( dllexport )INT32 ScanWlan()
{
// Declare and initialize variables.

HANDLE hClient = NULL;
DWORD dwError = ERROR_SUCCESS;

DWORD dwMaxClient = 2;  
DWORD dwCurVersion = 0;
DWORD dwResult = 0;

dwResult = WlanOpenHandle(dwMaxClient, NULL, &dwCurVersion, &hClient);
if (dwResult != ERROR_SUCCESS) 
{
 WlanCloseHandle(hClient, NULL);
 wprintf(L"WlanOpenHandle failed with error: %u\n", dwResult);
 return 1;
}


I am able to call this funtion from WinRT App. But 'WlanOpenHandle' function failed with error 5 (ERROR_ACCESS_DENIED).

I have done this using administrator login also. But still I am getting the same error.

Am I doing the right thing?

Can We access Win32 APIs from WinRT Apps through Dlls (at least).

Any help?

Thank you,

Sai
AnswerRe: Accessing Win32 APIs from WinRT app through Win32 Dll Pin
Richard MacCutchan1-Apr-13 21:37
mveRichard MacCutchan1-Apr-13 21:37 
GeneralRe: Accessing Win32 APIs from WinRT app through Win32 Dll Pin
msr_codeproject1-Apr-13 23:17
msr_codeproject1-Apr-13 23:17 
AnswerRe: Accessing Win32 APIs from WinRT app through Win32 Dll Pin
MicroVirus1-Apr-13 23:43
MicroVirus1-Apr-13 23:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.