LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading Registry Io interference

Hi 

I got a problem which is not making sense.

I got a program which takes a bin file which is a program and downloads it via the parallel port to a device to simulator the program.

The problem is that my program doesnt download vai the parallel port correctly if i acces the registry.

Why could this be ?

if i comment those registry functions it downloads correctly.

 

I get the correct information from the registry functions and no errors.

Here is an example for my registry functions:

 

 

HKEY hKey;
LONG openres;
DWORD res;
DWORD type =REG_SZ;
DWORD cbData =1024;

openres=RegOpenKeyEx(HKEY_CURRENT_USER,"SOFTWARE\\Winzapper\\General",0,KEY_QUERY_VALUE,&hKey);
if(openres!=ERROR_SUCCESS)
{
   	MessagePopup("","Error Opening Registry Key");
}
else
{
	res=RegQueryValueEx(hKey,"EpromTypeIndex", NULL, &type, buffer, &cbData);
	if(res!=ERROR_SUCCESS)
	{
		MessagePopup("","Error reading value");	
	}
	else
	{
		Config.iEpromType=atoi(buffer);
		SetCtrlIndex (MainPnl, MAINPANEL_EPROM_TYPE, Config.iEpromType);	
	}
	res=RegCloseKey(hKey);
        if(res!=ERROR_SUCCESS)
	{
	        MessagePopup("","Error closing registry key");
	}
}

 

Help share your knowlegde
0 Kudos
Message 1 of 3
(3,010 Views)

Hi Shako,

 

Could you provide us with your code that pushes the bin file also?

 

Regards,

 

Josh L.

Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(2,984 Views)

I found my the problem.

I was sending some incorrect information and by commenting out the registry functions set the program to my default values which were correct.

The actual registry functions were not a problem.

 

 

 

Help share your knowlegde
0 Kudos
Message 3 of 3
(2,975 Views)