Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Newbie questions - Couple of VC++ questions regarding dlls and VB6

Reply
Thread Tools

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

 
 
Ali Syed
Guest
Posts: n/a
 
      10-12-2004
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
 
Reply With Quote
 
 
 
 
Mark A. Odell
Guest
Posts: n/a
 
      10-12-2004
http://www.velocityreviews.com/forums/(E-Mail Removed) (Ali Syed) wrote in
news:(E-Mail Removed) om:

> 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.

--
- Mark ->
--
 
Reply With Quote
 
 
 
 
Merrill & Michele
Guest
Posts: n/a
 
      10-12-2004

> 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

>
> > Any valid suggestions appreciated

>
> Sure, no problem.
>
> --
> - Mark ->
> --



 
Reply With Quote
 
Mark McIntyre
Guest
Posts: n/a
 
      10-13-2004
On Tue, 12 Oct 2004 16:17:22 -0500, in comp.lang.c , "Merrill & Michele"
<(E-Mail Removed)> wrote:

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


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

(Mark odell wrote)

>> 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.


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.


--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>


----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
A couple questions regarding the Canon 550 EX flash friesian@zoocrewphoto.com Digital Photography 0 04-01-2008 05:08 AM
A couple questions regarding a soho 91 router 1911 Cisco 0 01-01-2008 08:40 PM
A couple of questions regarding IOS software Andrew Hodgson Cisco 4 02-06-2006 04:49 PM
vb6 active-x dlls in asp.net Markus ASP .Net 1 07-01-2005 05:16 PM
Debugging VB6 DLLs from ASP.NET Mike Wilmot ASP .Net 2 12-15-2003 07:34 PM



Advertisments