Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
S

Swatgod

@Swatgod
About
Posts
5
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • please help
    S Swatgod

    in the firstlast function i made it so it used a char array for both and made the other functions with return type char as before it was causing trouble with it going directly to int. but the program is still crashing between the end of the 2nd function and start of the 3rd but now it actually prints soemthign from the 3rd function. the more you learn the less you know, no one is truely a master. cause the more you seek to be the master the less of a master you become.

    C / C++ / MFC help css

  • please help
    S Swatgod

    the main source of the dll file is: #include "stdafx.h" #include BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { return TRUE; } extern "C" __declspec(dllexport) firstn(); extern "C" __declspec(dllexport) lastn(); extern "C" __declspec(dllexport) firstlast(char first, char last); extern "C" __declspec(dllexport) firstn() { char first[10]; printf(" What is your first name: "); scanf(" %s", first); return (char)first; } extern "C" __declspec(dllexport) lastn() { char last[10]; printf(" What is your last name: "); scanf(" %s", last); return (char)last; } extern "C" __declspec(dllexport) firstlast(char first, char last) { printf(" your first and last name is %s %s.", first, last); return 0; } once again thank you for your help. the more you learn the less you know, no one is truely a master. cause the more you seek to be the master the less of a master you become.

    C / C++ / MFC help css

  • please help
    S Swatgod

    here is the code of the main application. the first 2 functiosn that i have seen went through fine but when it loads the 3rd which is the one that needs input from other 2, it crashes. #include #include typedef void (*MYPROC)(LPTSTR); void main() { HINSTANCE hinstLib; MYPROC ProcAdd; BOOL fFreeResult, fRunTimeLinkSuccess = FALSE; hinstLib = LoadLibrary("name"); if(hinstLib != NULL) { ProcAdd = (MYPROC) GetProcAddress(hinstLib, "firstn"); if(fRunTimeLinkSuccess = (ProcAdd != NULL)) (ProcAdd)("firstn"); ProcAdd = (MYPROC) GetProcAddress(hinstLib, "lastn"); if(fRunTimeLinkSuccess = (ProcAdd != NULL)) (ProcAdd)("lastn"); ProcAdd = (MYPROC) GetProcAddress(hinstLib, "firstlast"); if(fRunTimeLinkSuccess = (ProcAdd != NULL)) (ProcAdd)("firstlast"); fFreeResult = FreeLibrary(hinstLib); } if(! fRunTimeLinkSuccess) printf("--loading of main dll failed--"); } the more you learn the less you know, no one is truely a master. cause the more you seek to be the master the less of a master you become.

    C / C++ / MFC help css

  • please help
    S Swatgod

    well the functions are called from a dll i made and the way that i have seen done, wont let me do it like that, her ei show a small sample of how my functions are called in the exe from my dll file. ProcAdd=(MYPROC)GetProcAddress(hinstLib,"firstlast"); if(fRunTimeLinkSuccess = (ProcAdd != NULL)) (ProcAdd)("firstlast"); the more you learn the less you know, no one is truely a master. cause the more you seek to be the master the less of a master you become.

    C / C++ / MFC help css

  • new to dll files
    S Swatgod

    ok i am very new to working with dll files and just recently got a dll to compile and a program to compile and use the dll file. i made a program to test my dll, in my dll i got functions defined that have variables defined that are returned and than used in another function in the same dll file. what i was wondering was how i can return those variables and get them to be used cause after i got through first function the program crashes. not sure if its something to do with how i return the variables or not, if someone could help i would really appreciate it. the more you learn the less you know, no one is truely a master. cause the more you seek to be the master the less of a master you become.

    C / C++ / MFC css help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups