CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2005
    Posts
    73

    Question i got something interesting in Windows DLLs

    hello guys:
    tht scenario, it's interesting and somehow weird,yesterday i copied OS's dll 'gdi32.dll' to c:\ from c:\windows\system32\,and i ran loadlibrary/getprocaddress things in a MFC dialogbox-based application, i'm sure tht i've locatted the function 'CreateCompatibleDC' from 'c:\gdi32.dll' correctly; then i invoked tht function,my app shown me a collapse of memory error,i can't understand tht, Ain't those OS dlls supposed to be available anytime anywhere?

  2. #2
    Join Date
    Oct 2002
    Location
    Timisoara, Romania
    Posts
    14,360

    Re: i got something interesting in Windows DLLs

    Did you call it with correct arguments? And BTW, why would you do something like that?
    Marius Bancila
    Home Page
    My CodeGuru articles

    I do not offer technical support via PM or e-mail. Please use vbBulletin codes.

  3. #3
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    4,626

    Re: i got something interesting in Windows DLLs

    several of the system DLL's simply won't work if you copy them to anothe rlocation or force them to be loaded in a different location in memory.

    If you already have a GDI32, then force-load another GDI32 by copying the DLL to another location and calling loadlibrary... Doesn't surprise me at all it ends up crashing or not working.

  4. #4
    Join Date
    Apr 1999
    Posts
    27,449

    Re: i got something interesting in Windows DLLs

    Quote Originally Posted by Entrant_phil View Post
    hello guys:
    tht scenario, it's interesting and somehow weird,yesterday i copied OS's dll 'gdi32.dll' to c:\ from c:\windows\system32\,
    Hopefully you run this malware only on your own system and not screw up someone elses.

    Regards,

    Paul McKenzie

  5. #5
    Join Date
    Jan 2005
    Posts
    73

    Resolved Re: i got something interesting in Windows DLLs

    so i guess msft had something in OS DLLs as principle for security's sake, and yep i'd have this awesome procedure only running on my own system lol. thank you guys for replies;

    have a nice day

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

Featured