In your dll maybe you should try
if (DeviceIoControl(h, IOCTL_DEBUG_LOG_INFO, debugLogInfoData, sizeof(DEBUG_LOG_INFO), debugLogInfoData, sizeof(DEBUG_LOG_INFO), junk, NULL)) == STATUS_SUCCESS
I don't know what the value of STATUS_SUCCES is but that's what the if is testing on right? I guess the return value is an error code or zero when everything went okay, but with booleans it's the other way around. zero means false and not zero is true. Could this be the problem?
Good luck!