Click here to Skip to main content
15,894,343 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Programatically get filename of loaded dll in a running process Pin
Stephen Hewitt6-Apr-06 17:47
Stephen Hewitt6-Apr-06 17:47 
GeneralRe: Programatically get filename of loaded dll in a running process Pin
kanad6-Apr-06 18:28
kanad6-Apr-06 18:28 
GeneralRe: Programatically get filename of loaded dll in a running process Pin
Stephen Hewitt6-Apr-06 18:34
Stephen Hewitt6-Apr-06 18:34 
GeneralRe: Programatically get filename of loaded dll in a running process Pin
kanad6-Apr-06 19:34
kanad6-Apr-06 19:34 
GeneralRe: Programatically get filename of loaded dll in a running process Pin
Stephen Hewitt6-Apr-06 19:38
Stephen Hewitt6-Apr-06 19:38 
AnswerRe: Programatically get filename of loaded dll in a running process Pin
Naveen6-Apr-06 18:36
Naveen6-Apr-06 18:36 
QuestionHow to use memcpy() efficiently? Pin
pavanbabut6-Apr-06 16:56
pavanbabut6-Apr-06 16:56 
AnswerRe: How to use memcpy() efficiently? Pin
El Corazon6-Apr-06 17:32
El Corazon6-Apr-06 17:32 
pavanbabut wrote:
Say my source buffer = 630000 bytes, destination buffer = 630272 bytes
So on fisr iteration of memcopy i would copy the whole 630000bytes of my source buffer into my destination buffer, so at this point destination buffer is left with 272bytes more room, so what I want is to copy the first 272 bytes of source buffer into the remaining destination buffer.
Is there anyway to implement this using memcpy() or memmove() etc functions?? I would really appreciate if anyone can help me out in this.


I am not sure why you would want to do this... but you can add to a pointer to offset location. if you want byte offset, only add to char pointers.




void strangecopy(char *dest, int destsize, char *source, int sourcesize)
{
    do 
    {
        if (destsize<sourcesize)
        {
            // destination is too small truncate copy
            memcpy(dest,source,destsize);
        } else 
        {
           // destination is larger or equal, fill
           memcpy(dest,source,sourcesize);
        }
        dest+=sourcesize;
        destsize-=sourcesize;
    } while (destsize>sourcesize);
}


_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)


-- modified at 23:32 Thursday 6th April, 2006
GeneralRe: How to use memcpy() efficiently? Pin
pavanbabut6-Apr-06 18:07
pavanbabut6-Apr-06 18:07 
GeneralRe: How to use memcpy() efficiently? Pin
Blake Miller7-Apr-06 4:15
Blake Miller7-Apr-06 4:15 
GeneralRe: How to use memcpy() efficiently? Pin
pavanbabut7-Apr-06 5:05
pavanbabut7-Apr-06 5:05 
QuestionOpen a zip File Pin
lekshmipriya6-Apr-06 15:12
lekshmipriya6-Apr-06 15:12 
AnswerRe: Open a zip File Pin
Hamid_RT6-Apr-06 19:14
Hamid_RT6-Apr-06 19:14 
GeneralRe: Open a zip File Pin
lekshmipriya7-Apr-06 4:28
lekshmipriya7-Apr-06 4:28 
GeneralRe: Open a zip File Pin
Hamid_RT7-Apr-06 5:15
Hamid_RT7-Apr-06 5:15 
QuestionDLL in DLL Pin
_anil_6-Apr-06 14:42
_anil_6-Apr-06 14:42 
AnswerRe: DLL in DLL Pin
John R. Shaw6-Apr-06 15:25
John R. Shaw6-Apr-06 15:25 
AnswerRe: DLL in DLL Pin
Stephen Hewitt6-Apr-06 16:16
Stephen Hewitt6-Apr-06 16:16 
GeneralRe: DLL in DLL Pin
_anil_6-Apr-06 17:03
_anil_6-Apr-06 17:03 
QuestionCEditView and wrapping Pin
Trollslayer6-Apr-06 13:27
mentorTrollslayer6-Apr-06 13:27 
AnswerRe: CEditView and wrapping [modified] Pin
Ryan Binns6-Apr-06 18:20
Ryan Binns6-Apr-06 18:20 
GeneralRe: CEditView and wrapping [modified] Pin
Trollslayer6-Apr-06 22:41
mentorTrollslayer6-Apr-06 22:41 
Questioncan any one help me!! Pin
nanaolay6-Apr-06 12:26
nanaolay6-Apr-06 12:26 
AnswerRe: can any one help me!! Pin
Lord Kixdemp6-Apr-06 13:07
Lord Kixdemp6-Apr-06 13:07 
AnswerRe: can any one help me!! Pin
Trollslayer6-Apr-06 13:28
mentorTrollslayer6-Apr-06 13:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.