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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. ilmerge

ilmerge

Scheduled Pinned Locked Moved C / C++ / MFC
question
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    Opwar
    wrote on last edited by
    #1

    I tried this program to put the .dll inside the .exe and it didnt work. Do i need to change the locations of the files in the config? { static char Path[MAX_PATH]; GetModuleFileName(NULL, Path, MAX_PATH); unsigned int i = strlen(Path); while (Path[i] != '\\') { Path[i] = '\0'; i--; } strcat(Path, "my.dll"); return Path; like is there a special way i put the path in? Or do i need to add something to my dll?

    T 1 Reply Last reply
    0
    • O Opwar

      I tried this program to put the .dll inside the .exe and it didnt work. Do i need to change the locations of the files in the config? { static char Path[MAX_PATH]; GetModuleFileName(NULL, Path, MAX_PATH); unsigned int i = strlen(Path); while (Path[i] != '\\') { Path[i] = '\0'; i--; } strcat(Path, "my.dll"); return Path; like is there a special way i put the path in? Or do i need to add something to my dll?

      T Offline
      T Offline
      Terry ONolley
      wrote on last edited by
      #2

      For one thing, you can remove the call to strlen() because GetModuleFileName returns the length of the string: unsigned int i = GetModuleFileName(NULL, Path, MAX_PATH); Aside from that, your code looks like it does what I think you want it to do: replace "C:\DIRECTORY\FILENAME.EXE" with "C:\DIRECTORY\my.dll" What exactly isn't working?


      Glano perictu com sahni delorin!

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

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