Skip to main content

Hi All,

 

 I am trying to listen to key events using following C# code. I am getting response code 2. Please help me. 

 

public static UInt32 StartKeyIntercept(out string s)
{
StringBuilder Data = new StringBuilder(50);
Data.Append("A L");
UInt32 rc = 0;
UInt32 f = HA_START_KEY_INTERCEPT;//50 
UInt32 l = 256;
UInt32 r = EhllapiFunc.hllapi(out f, Data, out l, out rc);
s = Data.ToString();
return r;
}


#Rumba
#Rumba9.5

Hi All,

 

 I am trying to listen to key events using following C# code. I am getting response code 2. Please help me. 

 

public static UInt32 StartKeyIntercept(out string s)
{
StringBuilder Data = new StringBuilder(50);
Data.Append("A L");
UInt32 rc = 0;
UInt32 f = HA_START_KEY_INTERCEPT;//50 
UInt32 l = 256;
UInt32 r = EhllapiFunc.hllapi(out f, Data, out l, out rc);
s = Data.ToString();
return r;
}


#Rumba
#Rumba9.5
Hi Raman,

your data string should have three spaces between the "A" and the "L". Looking above there appears to be only one space between the "A" and the "L".

Tom

Hi All,

 

 I am trying to listen to key events using following C# code. I am getting response code 2. Please help me. 

 

public static UInt32 StartKeyIntercept(out string s)
{
StringBuilder Data = new StringBuilder(50);
Data.Append("A L");
UInt32 rc = 0;
UInt32 f = HA_START_KEY_INTERCEPT;//50 
UInt32 l = 256;
UInt32 r = EhllapiFunc.hllapi(out f, Data, out l, out rc);
s = Data.ToString();
return r;
}


#Rumba
#Rumba9.5
Hi Raman,

your data string should have three spaces between the "A" and the "L". Looking above there appears to be only one space between the "A" and the "L".

Tom

Hi All,

 

 I am trying to listen to key events using following C# code. I am getting response code 2. Please help me. 

 

public static UInt32 StartKeyIntercept(out string s)
{
StringBuilder Data = new StringBuilder(50);
Data.Append("A L");
UInt32 rc = 0;
UInt32 f = HA_START_KEY_INTERCEPT;//50 
UInt32 l = 256;
UInt32 r = EhllapiFunc.hllapi(out f, Data, out l, out rc);
s = Data.ToString();
return r;
}


#Rumba
#Rumba9.5
It is working now. Thanks a lot TomFitz

Hi All,

 

 I am trying to listen to key events using following C# code. I am getting response code 2. Please help me. 

 

public static UInt32 StartKeyIntercept(out string s)
{
StringBuilder Data = new StringBuilder(50);
Data.Append("A L");
UInt32 rc = 0;
UInt32 f = HA_START_KEY_INTERCEPT;//50 
UInt32 l = 256;
UInt32 r = EhllapiFunc.hllapi(out f, Data, out l, out rc);
s = Data.ToString();
return r;
}


#Rumba
#Rumba9.5
It is working now. Thanks a lot TomFitz