Results 1 to 9 of 9

Thread: can u say how to create a .exe file for V.B 6.0 application

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2007
    Posts
    167

    can u say how to create a .exe file for V.B 6.0 application

    Hi all,
    till now so many times i created .exe files for my v.b applications.those are working. how i did was by going to "file" menu,there i would select "make applicationname.exe".

    but in my current v.b application, i am calling a .dll file which was developed in vc++ application.
    but the problem is when ever i ran the .exe file. a popup window is coming and saying that a critical error is occured...

    can u say how to create a .exe file for my v.b application, suppose if it contains a .dll file?
    and my version of v.b application is 6.0

    Thanks in advance:
    regards:
    raghunadhs

  2. #2
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: can u say how to create a .exe file for V.B 6.0 application

    You need to Delare it like you would an API call. Then you can call it. You would also need any dependencies that it has.

    How are you calling it?

  3. #3
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    Re: can u say how to create a .exe file for V.B 6.0 application

    You mean to say that this error occurs only in your exe and not while you run your project in VB SDE..
    If an answer to your question has been helpful, then please, Rate it!

    Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.


  4. #4
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926

    Re: can u say how to create a .exe file for V.B 6.0 application

    Is this error on the develpoment machine, or on another machine?
    If the last: Did you install the program on the other machine, or did you just copy the exe?
    Frans

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    May 2007
    Posts
    167

    Re: can u say how to create a .exe file for V.B 6.0 application

    HI all,
    my original application is working well, the problem comes only when i made it .exe. when ever i try to run .exe it is giving me errror like..(please see the attached word document... there i pasted screen shots)
    i placed my .exe file in a folder where my dll file is placed. and before making my v.b app as .exe, i gave correct path of my dll file also

    the following is regarding to decleration which says v.b app where my dll is placed . "CrcComputeCrc32" is my dll's method name.

    Please see the attached word document regarding to the error what i usually getting.....

    Private Declare Sub CrcComputeCrc32 _
    Lib "VC++\CRC32Example\Debug\CRC32Example.dll" Alias "_CrcComputeCrc32@12" _
    (ByRef FirstElement As Byte, ByVal intNoOfElements As Integer, ByRef bytCrc32Array As Byt

    Thanks in advance:
    regards:
    raghunadhs.
    Attached Files Attached Files

  6. #6
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: can u say how to create a .exe file for V.B 6.0 application

    Quote Originally Posted by Frans C
    Is this error on the develpoment machine, or on another machine?
    If the last: Did you install the program on the other machine, or did you just copy the exe?
    What is the answer to these questions?

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    May 2007
    Posts
    167

    Re: can u say how to create a .exe file for V.B 6.0 application

    Hi Hack,
    it was on my machiene only. i developed .exe on my machiene and checked whehter it is working or not... but it is giving errors.

    Thanks:
    regards:
    raghunadhs
    Quote Originally Posted by Hack
    What is the answer to these questions?
    Last edited by raghunadhs; Aug 9th, 2007 at 06:30 AM. Reason: to make it more clarity

  8. #8
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926

    Re: can u say how to create a .exe file for V.B 6.0 application

    Why did you include a (relative) path in the declare, if the dll is in your programs directory?

    Show us also the source code where you use this function (including the code where you initiate the arrays).
    Frans

  9. #9

    Thread Starter
    Addicted Member
    Join Date
    May 2007
    Posts
    167

    Re: can u say how to create a .exe file for V.B 6.0 application

    Hi Frans c,
    by mistakenly i put the path like that, but i changed it in my real application
    the following is the function call, thats what i am calling in v.b application.
    Call CrcComputeCrc32(bytChannelLock(1), intCrcLength, bytReflectArray(0))

    bytReflectArray(0) is an arrray of byte type, is used to hold the result of the crc value. when ever crc is found in vc++ application, it places the result in this "bytReflect......" array. means as it is call by ref, and am sending this as a parameeter, the values will be put in this array in vc++ will also be reflected.
    bytChannelLock(1) is also an array contains byte data on which i have to find the crc32, and intCrcLength is a integer type variable says on how many elements CRC is to be found(simply length of the 1st parameter).

    now this is my code developed in vc++....

    void __declspec(dllexport) __stdcall CrcComputeCrc32(UINT8* u8ptrData,int u16Length,UINT8* u8Crc32Array)

    //here u8ptrdata is a pointer, of unsigned char which takes one byte.
    //U8Crc32Array is an arraay, in which the final result is stored.
    {
    //SDD-0006
    // This variable holds the current data byte
    UINT8 u8DataByte = (UINT8) NULL;
    UINT32 u32PreviousCrc = NULL;



    //SDD-0007
    // Complement the u32PreviousCrc.
    u32PreviousCrc ^= (UINT32) 0xFFFFFFFF;

    // Compute CRC-32 using SDLC/HDLC CRC Algorithm.
    while(u16Length > NULL)
    {
    //SDD-0008
    u8DataByte = *u8ptrData;
    u32PreviousCrc = (u32PreviousCrc >> 8) ^
    u32Crc32Table[u8DataByte ^ (UINT8) u32PreviousCrc];
    u8ptrData++;
    u16Length--;
    }

    //SDD-0009
    // Complement the u32PreviousCrc.
    u32PreviousCrc ^= (UINT32) 0xFFFFFFFF;

    u8Crc32Array[3] = (unsigned char) (u32PreviousCrc & 0x000000FF);

    u8Crc32Array[2] = (unsigned char) ((u32PreviousCrc & 0x0000FF00) >> 8);

    u8Crc32Array[1] = (unsigned char) ((u32PreviousCrc & 0x00FF0000) >> 16);

    u8Crc32Array[0] = (unsigned char) ((u32PreviousCrc & 0xFF000000) >> 24);


    // as u8crc32array is unsigned long, to make it 4 unsigned unsigned chars i did as above

    //SDD-0010
    // Return the computed checksum.
    //return;
    }
    /************************************** End of crc.c *************************/





    Quote Originally Posted by Frans C
    Why did you include a (relative) path in the declare, if the dll is in your programs directory?

    Show us also the source code where you use this function (including the code where you initiate the arrays).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width