Need the codes for the following.

This is a discussion on Need the codes for the following. within the C++ Programming forums, part of the General Programming Boards category; (I'm basicly a "newbie" in .dll programming,) so can someone send me a simple code for: -Dynamic-Link Library, data.dll. (which ...

  1. #1
    Registered User
    Join Date
    Jun 2004
    Posts
    20

    Need the codes for the following.

    (I'm basicly a "newbie" in .dll programming,) so can someone send me a simple code for:

    -Dynamic-Link Library, data.dll. (which contains text, that can be viewed with the open.exe)(also this .dll contains a "5 passwords" -ask).
    -Console application, open.exe. (that opens the data.dll when you write "load data.dll")(also this .exe will shutdown if you do not write the 5 passwords in 10 seconds).
    -Dynamic-Link Library, passwords.dll. (which contains 5 passwords, that can be opened with the open.exe by writing "load passwords.dll") (so when this .dll is loaded, it will automatically write the passwords).

    Thanks alot.

  2. #2
    mustang benny bennyandthejets's Avatar
    Join Date
    Jul 2002
    Posts
    1,401
    Have a look at these functions (search google or msdn):

    LoadLibrary()
    DllEntryPoint()
    FreeLibrary()
    GetProcAddress()

    We're not going to write the whole thing for you. If you can't even start the project yourself, it's too hard, so try something simpler.
    benforbes@optusnet.com.au
    Microsoft Visual Studio .NET 2003 Enterprise Architect
    Windows XP Pro

    Code Tags
    Programming FAQ
    Tutorials

  3. #3
    Registered User
    Join Date
    Jun 2004
    Posts
    20
    "If you can't even start the project yourself, it's too hard, so try something simpler."

    I'm finnish, so I don't understand every C++ function term. Of course I can start the project myself, but I have never been in touch with dlls. So well, of course it would be better for me to get the code first, and then learn. I don't even have an example(no fence, but msdn doesn't support the best examples).

  4. #4
    Registered User
    Join Date
    Aug 2003
    Posts
    470
    www.codeguru.com and www.codeproject.com should have some good projects and articles on dlls.

  5. #5
    Registered User
    Join Date
    Jun 2004
    Posts
    20
    okinrus, yet I don't have the brain nor the resources to start developing a project on my own. So basicly I would need the code first, and then start learning(as said above).

  6. #6
    Registered User
    Join Date
    Jun 2004
    Posts
    40
    Terve Nouneim,

    I am also new to programming, but I saw that you said you are Finnish, I work for a Finnish company and I have been to Finland many, many times. Just wanted to say hi. Hope you can find some help here.

  7. #7
    Registered User
    Join Date
    Jun 2004
    Posts
    20
    "I work for a Finnish company"

    -The name of the company?

    "Hope you can find some help here."

    -Thanks.

    You should visit Finland in the time of the Northern Lights, they're pretty awesome.

  8. #8
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >So basicly I would need the code first
    Why? If you don't understand enough to write it then how can you expect to understand anything we give you? Basically, you want us to do your job for no compensation at all.

    >yet I don't have the brain nor the resources to start developing a project on my own
    That's a lame excuse. There are many times where I've had to build a project from scratch while learning the language/environment at the same time. If it's not important enough to you to learn while you create, then clearly it's not important enough for us to give to you. You'll get a plenty of sarcastic responses from us because this "project" isn't terribly difficult even if you don't know anything about it. At the very most, being incredibly liberal, I would say that learning and writing the whole thing from scratch might take you a working day.
    My best code is written with the delete key.

  9. #9
    Registered User
    Join Date
    Jun 2004
    Posts
    20
    Prelude, when I got my first "bigger" game project code, I learned it that way. See because things go your head better through vision. Yet don't reply to me that "msdn has examples and you see them through vision", because these are not the same.

    When adjusting the code to what I want it, I learn at the same.

    Here is the first program that I have written 100% myself:

    #include <iostream>
    #include <stdlib.h>
    #include <conio.c>
    #include <string>

    using namespace std;

    bool passwords(void);

    int main(){

    cout<<"Passwords:"<<endl;
    bool access = passwords();
    if(access){
    cout<<"Access granted.\n\n"<<endl;
    cout<<"Press any key to continue.";
    getche();
    clrscr();
    do{
    cout << "Select subject:\n";
    cout << "" << endl;
    cout << "1 : Subject1\n";
    cout << "2 : Subject2\n";
    cout << "3 : Subject3\n";

    int c;
    c = 0;
    cin >> c;
    cout << "\n";

    switch (c)
    {
    case 1 : cout << "Here is information concerning Subject1." <<endl;
    cout << "And here is some more information concerning Subject1.\n\n" <<endl;
    cout << "Press any key to return to choose another alternative." <<endl;
    break;
    case 2 : cout << "Here is information concerning Subject2." <<endl;
    cout << "And here is some more information concerning Subject2.\n\n" <<endl;
    cout << "Press any key to return to choose another alternative." <<endl;
    break;
    case 3 : cout << "Here is information concerning Subject3." <<endl;
    cout << "And here is some more information concerning Subject3.\n\n" <<endl;
    cout << "Press any key to return to choose another alternative." <<endl;
    break;
    default : return 0;
    }
    getche();
    clrscr();
    }while(true);
    }
    if(!access){
    cout<<"Access denied."<<endl;
    getch();
    return 0;
    }
    }

    bool passwords(void){
    string ps1="ps1";
    string ps2="ps2";
    string ps3="ps3";
    string ps4="ps4";
    string ps5="ps5";

    string up1;
    string up2;
    string up3;
    string up4;
    string up5;

    cin>>up1;
    cin>>up2;
    cin>>up3;
    cin>>up4;
    cin>>up5;

    if(up1==ps1 && up2==ps2 && up3==ps3 && up4==ps4 && up5==ps5)
    return true;
    else
    return false;
    }
    and it tooked for like a week to create it. And this is as simple as a code can be.
    Yet when I got a game source code, I learned the most of it in a blink of an eye.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. codes
    By IfYouSaySo in forum A Brief History of Cprogramming.com
    Replies: 34
    Last Post: 11-18-2005, 02:09 PM
  2. Replies: 1
    Last Post: 07-12-2005, 09:03 PM
  3. action replay codes
    By c++.prog.newbie in forum Game Programming
    Replies: 2
    Last Post: 02-28-2004, 07:47 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21