Click here to Skip to main content
15,920,670 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to use IMpeg2Data & IMpeg2PsiParser Intefaces Pin
Nibu babu thomas5-May-06 21:16
Nibu babu thomas5-May-06 21:16 
AnswerRe: How to use IMpeg2Data & IMpeg2PsiParser Intefaces Pin
Justin Tay5-May-06 21:21
Justin Tay5-May-06 21:21 
GeneralRe: How to use IMpeg2Data & IMpeg2PsiParser Intefaces Pin
Andy Rama5-May-06 21:53
Andy Rama5-May-06 21:53 
QuestionI can run my app, but no one else can ;(... why? Pin
chasetoys5-May-06 18:58
chasetoys5-May-06 18:58 
QuestionRe: I can run my app, but no one else can ;(... why? Pin
Maxwell Chen5-May-06 19:16
Maxwell Chen5-May-06 19:16 
AnswerRe: I can run my app, but no one else can ;(... why? Pin
chasetoys5-May-06 19:44
chasetoys5-May-06 19:44 
AnswerRe: I can run my app, but no one else can ;(... why? Pin
Maxwell Chen5-May-06 19:54
Maxwell Chen5-May-06 19:54 
AnswerRe: I can run my app, but no one else can ;(... why? Pin
Hamid_RT5-May-06 19:30
Hamid_RT5-May-06 19:30 
QuestionVC++ Pin
narkhi5-May-06 18:55
narkhi5-May-06 18:55 
QuestionRe: VC++ Pin
Maxwell Chen5-May-06 19:14
Maxwell Chen5-May-06 19:14 
AnswerRe: VC++ Pin
Hamid_RT5-May-06 19:26
Hamid_RT5-May-06 19:26 
Questionhow can I get the message of WM_LBUTTONUP of the Vertical Scroll Bar Pin
yingkou5-May-06 18:47
yingkou5-May-06 18:47 
AnswerRe: how can I get the message of WM_LBUTTONUP of the Vertical Scroll Bar Pin
Hamid_RT5-May-06 20:23
Hamid_RT5-May-06 20:23 
GeneralRe: how can I get the message of WM_LBUTTONUP of the Vertical Scroll Bar Pin
yingkou5-May-06 23:01
yingkou5-May-06 23:01 
GeneralRe: how can I get the message of WM_LBUTTONUP of the Vertical Scroll Bar Pin
Hamid_RT6-May-06 0:25
Hamid_RT6-May-06 0:25 
QuestionMigration to C++.NET Pin
ahmed_adel_farid5-May-06 18:28
ahmed_adel_farid5-May-06 18:28 
AnswerRe: Migration to C++.NET Pin
Stephen Hewitt5-May-06 18:33
Stephen Hewitt5-May-06 18:33 
GeneralRe: Migration to C++.NET Pin
ahmed_adel_farid5-May-06 19:43
ahmed_adel_farid5-May-06 19:43 
GeneralRe: Migration to C++.NET Pin
Stephen Hewitt5-May-06 23:33
Stephen Hewitt5-May-06 23:33 
AnswerRe: Migration to C++.NET Pin
Phil C5-May-06 21:28
Phil C5-May-06 21:28 
GeneralRe: Migration to C++.NET Pin
Stephen Hewitt5-May-06 23:01
Stephen Hewitt5-May-06 23:01 
GeneralRe: Migration to C++.NET Pin
Phil C6-May-06 6:19
Phil C6-May-06 6:19 
GeneralRe: Migration to C++.NET Pin
Stephen Hewitt6-May-06 18:29
Stephen Hewitt6-May-06 18:29 
GeneralRe: Migration to C++.NET Pin
Phil C6-May-06 19:42
Phil C6-May-06 19:42 
QuestionRevisiting calling a function in another dll Pin
LuckyCarl5-May-06 15:08
LuckyCarl5-May-06 15:08 
I have a function that is returning an integer, with a few strings being passed by reference. After running the debugger, it seems to run till I call the actual function that resides in a different dll. At that point I receive a window stating:
Unhandled exception at 0x0a30f6da in PCTest.exe: 0xC0000005: Access violation reading location 0xcccccccc.
The value of the external function in the debugger is 0x0a34310c and not 0xcccccccc.
I've set the permissions in the security to allow everyone, all access, (even the directory) but still access violation.

Here's my code, it seems simple enough, but I can not see it...

#include <stdlib.h>
#include <windows.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>

int main()
{
typedef int(* PExportedFn)(char*,char*,char*);
HMODULE hmod;
PExportedFn ExFunc;
char char1ref[10],char2rev[10],char3ref[10];
int ReturnValue;
hmod = LoadLibrary("C:\\MYDIR\\EXTDLL.DLL");
if (hmod != NULL)
{
printf("Succeeded loading library");
ExFunc = (PExportedFn)GetProcAddress(hmod,"FUNC");
if ( ExFunc != NULL)
{
printf("Succeeded loading library");
wcscpy(char1ref, "1234");
ReturnValue = ExFunc(char1ref,char2ref,char3ref);
printf("Succeeded, return value is:%f",ReturnVal);
}
}
else
{
printf("Did Not succeeded loading library");
}
return 0;
}

Any help would be greatly appreciated.
Carl


Lucky_Carl

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.