0
PROC bHook(LPSTR BaseLibraryName, LPSTR BaseFunctionName, PROC NewFunctionPointer, bool UnHook, PROC Custom)
{
PROC hBaseProc;
    return hBaseProc;

}

BOOL APIENTRY DllMain( HANDLE hModule, 
                       DWORD  ul_reason_for_call, 
                       LPVOID lpReserved
                     )
{
    switch (ul_reason_for_call)
    {
        case DLL_PROCESS_ATTACH:
            OutputDebugString("--------Detour dll Load!");

        bHook("KERNEL32.DLL", "CopyFileW", (PROC)MyCopyFileW, false, 0);

            break;
        case DLL_THREAD_ATTACH:
            break;
        case DLL_THREAD_DETACH:
            break;
        case DLL_PROCESS_DETACH:
            OutputDebugString("---------Detour dll exit");

            break;
    }
    return TRUE;
}

error C2440: 'type cast' : cannot convert from '' to 'int (__stdcall *)(void)'
None of the functions with this name in scope match the target type

I have encounter this error message from visual c++ 6.0.

Please help

2
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by max8888
0

Hi guys,
i am trying to hook a MyCopyFileW function in OS, that is ideally whenever a copy function is performed, another copy function will override it, with the stuffs i want it to do.

I am not sure if this is the correct copy function.

Any idea how to do it.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.