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

Discussion in 'C Programming' started by Ali Syed, Oct 12, 2004.

  1. Ali Syed

    Ali Syed Guest

    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
     
    Ali Syed, Oct 12, 2004
    #1
    1. Advertising

  2. (Ali Syed) wrote in
    news::

    > 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 ->
    --
     
    Mark A. Odell, Oct 12, 2004
    #2
    1. Advertising


  3. > 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 ->
    > --
     
    Merrill & Michele, Oct 12, 2004
    #3
  4. On Tue, 12 Oct 2004 16:17:22 -0500, in comp.lang.c , "Merrill & Michele"
    <> 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 =---
     
    Mark McIntyre, Oct 13, 2004
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mike Wilmot

    Debugging VB6 DLLs from ASP.NET

    Mike Wilmot, Dec 9, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    4,199
    Mike Wilmot
    Dec 15, 2003
  2. Markus

    vb6 active-x dlls in asp.net

    Markus, Jul 1, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    631
    Bruce Barker
    Jul 1, 2005
  3. Michael W. Ryder
    Replies:
    34
    Views:
    371
    Robert Klemme
    Apr 26, 2008
  4. Michael W. Ryder

    A Couple of Questions Regarding Ruby Style

    Michael W. Ryder, May 16, 2008, in forum: Ruby
    Replies:
    5
    Views:
    131
    Michael W. Ryder
    May 18, 2008
  5. Replies:
    16
    Views:
    173
Loading...

Share This Page