Newbie questions - Couple of VC++ questions regarding dlls and VB6

A

Ali Syed

1) Am I able to do this
long __stdcall TestResult(long SelectNum,char* sTime)

inside c++ dll as one of my dll functions without a memory leak

I pass a VB string variable for sTime. Will this work?

2)Do I need to delete or free existing memory from a dll function
if I do how do I do this?

3) I use char buffer[256] to retrieve info from an ini file
Do I have to free or delete this?
I tried
delete [] buffer;
but this doesn't seem right

4)DO I need to delete or free a CString after I am done with it?
If so how?

5) What is the scope of variables declared inside a function
accessible to my vb program?

Sorry but I am puzzled why I am getting very little back from the
memory I used when I call a dll function.....

Any valid suggestions appreciated


Ali
 
M

Mark A. Odell

(e-mail address removed) (Ali Syed) wrote in

1) Am I able to do this
long __stdcall TestResult(long SelectNum,char* sTime)

__stdcall is not part of C.
inside c++ dll as one of my dll functions without a memory leak

C++ is not C. DLLs are not part of C.
I pass a VB string variable for sTime. Will this work?

VB is not part of C.
2)Do I need to delete or free existing memory from a dll function
if I do how do I do this?

delete is not part of C.
3) I use char buffer[256] to retrieve info from an ini file
Do I have to free or delete this?
I tried
delete [] buffer;
but this doesn't seem right

Ini files are not part of C.
4)DO I need to delete or free a CString after I am done with it?
If so how?

There are no classes in C.
5) What is the scope of variables declared inside a function
accessible to my vb program?

Unknown, VB is not part of C.
Sorry but I am puzzled why I am getting very little back from the
memory I used when I call a dll function.....

I'm puzzled why you thought this had anything to do with C. You should
find a win32 programming newsgroup for these types of questions.
Any valid suggestions appreciated

Sure, no problem.
 
M

Merrill & Michele

Mark A. Odell" is indicated by the the single arrows

Mr. Odell does more with this completely off-the-wall posting than I would
have. He actually might have taught this guy something before telling him
to run along. My objection is with a point of philosophy. (see below)
1) Am I able to do this
long __stdcall TestResult(long SelectNum,char* sTime)

__stdcall is not part of C.
inside c++ dll as one of my dll functions without a memory leak

C++ is not C. DLLs are not part of C.
I pass a VB string variable for sTime. Will this work?

VB is not part of C.
2)Do I need to delete or free existing memory from a dll function
if I do how do I do this?

delete is not part of C.
3) I use char buffer[256] to retrieve info from an ini file
Do I have to free or delete this?
I tried
delete [] buffer;
but this doesn't seem right

Ini files are not part of C.
4)DO I need to delete or free a CString after I am done with it?
If so how?

There are no classes in C.
5) What is the scope of variables declared inside a function
accessible to my vb program?

Unknown, VB is not part of C.
Sorry but I am puzzled why I am getting very little back from the
memory I used when I call a dll function.....

I'm puzzled why you thought this had anything to do with C. You should
find a win32 programming newsgroup for these types of questions.

You should .... It's over two hundred years since David Hume was put into
the ground but we still fall headlong into the is/ought gap. The
interpersonal normative statement has no philosophical grounding of which I
am aware. I realized he may have been speaking colloquially. Let me
suggest a couple alternatives:
a) A win32 prog group might speak to your questions.
b) Bugger off. (mean-spirited)
c) Do what you want. My norms are not your norms. What's more, my computer
language of choice is not yours, and you suffer the disadvantage of being in
the forum that discusses mine. Now, kindly, bugger off.

Some thoughts. MPJ
 
M

Mark McIntyre

My objection is with a point of philosophy. (see below)

This is a C language group, not a philosophy group.

(Mark odell wrote)
You should .... It's over two hundred years since David Hume was put into
the ground but we still fall headlong into the is/ought gap.

What gap? The correct english idiom (see your own later post for what an
idiom isn't) is "should". I realise that english may not be your first
language.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top