Dll

This is a discussion on Dll within the C++ Programming forums, part of the General Programming Boards category; I am trying to teach myself about DLLs and so I found code for one and created a Win32DLL and ...

  1. #1
    edwardtisdale
    Guest

    Cool Dll

    I am trying to teach myself about DLLs and so I found code for one and created a Win32DLL and added the file. Executing it it asks me which .exe to use. What I want to know is is this DLL code safe to run should I write a small .exe to run it and how can I or where can I go to learn how to write such code?


    Here's the code:
    /* nag_save_random_state(g05cfc) Example Program
    *
    * Copyright 1990 Numerical Algoritms Group.
    *
    * Mark 1, 1990.
    */

    #include <nag.h>
    #include <stdio.h>
    #include <nag_stdlib.h>
    #include <nagg05.h>

    main()
    {
    Integer seed = 0;
    Integer i, istate[9];
    double x[5], xstate[4];

    Vprintf("g05cfc Example Program Results\n");
    g05cbc(seed);
    for (i=0; i<5; ++i)
    {
    c[i]=g05cac();
    if (i==1)
    g05cfc(istate,xstate);
    }
    for (i=0;i<5;++i)
    Vprintf("%9.4f%s", x[i], (i%5==4 || i==4)?"\n":" ");
    for (i=0;i<5;++i)
    {
    x[i]=g05cac()
    if (i==1)
    g05cgc(istate,xstate,NAGERR_DEFAULT);
    }
    for (i=0;i<5;++i)
    Vprintf(%9.4f%s",x[i],(i%5==4 || i==4)?"\n":" ");
    exit(EXIT_SUCCESS);
    }


    www.edwardtisdale.com

  2. #2
    Registered User
    Join Date
    Dec 2001
    Posts
    421
    DLLs are windows specific.. how about you ask in the windows forum??
    Quidquid latine dictum sit, altum sonatur.
    Whatever is said in Latin sounds profound.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. non-MFC DLL with MFC app question.
    By Kempelen in forum Windows Programming
    Replies: 10
    Last Post: 08-20-2008, 07:11 AM
  2. Replies: 1
    Last Post: 09-18-2005, 09:06 PM
  3. dll communicating between each other
    By cloudy in forum C++ Programming
    Replies: 5
    Last Post: 06-17-2005, 02:20 AM
  4. DLL and std::string woes!
    By Magos in forum C++ Programming
    Replies: 7
    Last Post: 09-08-2004, 12:34 PM
  5. .lib vs .h vs .dll
    By Shadow12345 in forum C++ Programming
    Replies: 13
    Last Post: 01-01-2003, 04:29 AM

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