if (szProcessName == "dtelnet.exe" | szProcessName == "adwin.exe")
You can't compare c strings like this. You need to use strcmp. Also you should use the logical or (||), rather than the bitwise or (|)
if (strcmp(szProcessName, "dtelnet.exe") == 0 || strcmp(szProcessName, "adwin.exe") == 0)