Click here to Skip to main content
15,908,842 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionhow to know file type and its protection type for office files? Pin
Le@rner24-Dec-13 1:22
Le@rner24-Dec-13 1:22 
SuggestionRe: how to know file type and its protection type for office files? Pin
Richard MacCutchan24-Dec-13 4:23
mveRichard MacCutchan24-Dec-13 4:23 
GeneralRe: how to know file type and its protection type for office files? Pin
Le@rner25-Dec-13 18:23
Le@rner25-Dec-13 18:23 
GeneralRe: how to know file type and its protection type for office files? Pin
Richard MacCutchan25-Dec-13 23:57
mveRichard MacCutchan25-Dec-13 23:57 
QuestionDirectShow - video resize interpolation Pin
sdancer7523-Dec-13 22:09
sdancer7523-Dec-13 22:09 
AnswerRe: DirectShow - video resize interpolation Pin
sdancer757-Jan-14 23:20
sdancer757-Jan-14 23:20 
AnswerRe: DirectShow - video resize interpolation Pin
sdancer754-Mar-14 21:52
sdancer754-Mar-14 21:52 
QuestionStuck at FILE_ATTRIBUTE_REPARSE_POINT attribute Pin
vishalgpt23-Dec-13 19:39
vishalgpt23-Dec-13 19:39 
AnswerRe: Stuck at FILE_ATTRIBUTE_REPARSE_POINT attribute Pin
Richard MacCutchan23-Dec-13 22:11
mveRichard MacCutchan23-Dec-13 22:11 
AnswerRe: Stuck at FILE_ATTRIBUTE_REPARSE_POINT attribute Pin
Randor 24-Dec-13 19:00
professional Randor 24-Dec-13 19:00 
AnswerRe: Stuck at FILE_ATTRIBUTE_REPARSE_POINT attribute Pin
jschell25-Dec-13 8:03
jschell25-Dec-13 8:03 
QuestionLittle OT, but I am really puzzled by this. Pin
Vaclav_23-Dec-13 15:12
Vaclav_23-Dec-13 15:12 
AnswerRe: Little OT, but I am really puzzled by this. Pin
enhzflep23-Dec-13 21:02
enhzflep23-Dec-13 21:02 
AnswerRe: Little OT, but I am really puzzled by this. Pin
Richard MacCutchan23-Dec-13 22:09
mveRichard MacCutchan23-Dec-13 22:09 
QuestionRe: Little OT, but I am really puzzled by this. Pin
CPallini26-Dec-13 7:17
mveCPallini26-Dec-13 7:17 
AnswerRe: Little OT, but I am really puzzled by this. Pin
Vaclav_26-Dec-13 8:20
Vaclav_26-Dec-13 8:20 
GeneralRe: Little OT, but I am really puzzled by this. Pin
CPallini26-Dec-13 9:04
mveCPallini26-Dec-13 9:04 
QuestionCan't call a VB6 function from C Pin
Arm5523-Dec-13 5:42
Arm5523-Dec-13 5:42 
QuestionRe: Can't call a VB6 function from C Pin
David Crow23-Dec-13 5:44
David Crow23-Dec-13 5:44 
AnswerRe: Can't call a VB6 function from C Pin
Arm5523-Dec-13 7:01
Arm5523-Dec-13 7:01 
GeneralRe: Can't call a VB6 function from C Pin
Richard Andrew x6423-Dec-13 9:13
professionalRichard Andrew x6423-Dec-13 9:13 
GeneralRe: Can't call a VB6 function from C Pin
Arm5523-Dec-13 10:08
Arm5523-Dec-13 10:08 
GeneralRe: Can't call a VB6 function from C Pin
Richard Andrew x6423-Dec-13 16:43
professionalRichard Andrew x6423-Dec-13 16:43 
GeneralRe: Can't call a VB6 function from C Pin
Arm5524-Dec-13 4:41
Arm5524-Dec-13 4:41 
Hi, thanks for your answer. I tried calling a function without parameters and without return value and it doesn't work. This is the VB function now:

VB
Public Sub SampleSub()
    MsgBox "Hello world!"
End Sub


And the new C prototype:

C++
typedef void (__stdcall *SampleSubPtr)(void);


But the same Access violation error (that says OllyDbg).

In the past I was able to call a VB6 function from C, that's why I'm so angry! Frown | :( But I just can't remeber how I did it. I'm sure I did it like I'm doing now, but I don't know why it doesn't work Hmmm | :| . Now SampleSub() is at 0x00401BC0.

Do you think that the way of compiling, the language (if C or C++) or something like that is causing errors? Because I'm 90% sure that the code is the same that the one I used in the past to call a VB6 function, so I need to think that I'm compiling wrong or something like that. I'm compiling like this (or that's what CodeBlocks does for me Poke tongue | ;-P ).

mingw32-g++.exe  -Wall -DBUILD_DLL -O2     -c "C:\Path\main.cpp" -o obj\Release\main.o


And using extern "C" in the main function.

Thanks again Smile | :) .

modified 24-Dec-13 10:49am.

GeneralRe: Can't call a VB6 function from C Pin
Richard Andrew x6424-Dec-13 6:51
professionalRichard Andrew x6424-Dec-13 6:51 

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.