RegCreatKeyEx, RegSetValueEx, RegQueryValueEx Problems SNMPExtensionQuery function

Dear all,

I create a SNMP MIB (Extension Agent) in VC++ . 

In the SNMPExtensionQuery function, I tried to use
RegCreateKeyEx,RegSetValueEx, RegQueryValueEx functions. But these
function do not work only in this SNMPExtensionQuery function.

I have coded for REstart, Shutdown and Logoff for the MIB functions.
The code for Restart and Shutdown works fine inside SNMP code.
The code for logoff does not work inside SNMP code.

Do any others face problem like mine.

Please help me for the above two problems

with regards,
Ranga.
0
4/27/2004 7:32:35 AM
vc.mfc 33608 articles. 0 followers. Follow

10 Replies
1376 Views

Similar Articles

[PageSpeed] 15

Dear all,
 
 I create a SNMP MIB (Extension Agent) in VC++ . 
 
 In the SNMPExtensionQuery function, I tried to use
 RegCreateKeyEx,RegSetValueEx, RegQueryValueEx functions. But these
 function do not work only in this SNMPExtensionQuery function.
 
 I have coded for REstart, Shutdown and Logoff for the MIB functions.
 The code for Restart and Shutdown works fine inside SNMP code.
 The code for logoff does not work inside SNMP code.
 
 Do any others face problem like mine.
 
 Please help me for the above two problems
 
 with regards,
 Ranga.



rangampalayam@rediffmail.com (Ranga) wrote in message news:<6e6631b7.0404262332.7a66e94a@posting.google.com>...
> Dear all,
> 
> I create a SNMP MIB (Extension Agent) in VC++ . 
> 
> In the SNMPExtensionQuery function, I tried to use
> RegCreateKeyEx,RegSetValueEx, RegQueryValueEx functions. But these
> function do not work only in this SNMPExtensionQuery function.
> 
> I have coded for REstart, Shutdown and Logoff for the MIB functions.
> The code for Restart and Shutdown works fine inside SNMP code.
> The code for logoff does not work inside SNMP code.
> 
> Do any others face problem like mine.
> 
> Please help me for the above two problems
> 
> with regards,
> Ranga.
0
4/29/2004 5:09:23 AM
Hi all,

  I create a SNMP MIB (Extension Agent) in VC++ . 
  
  In the SNMPExtensionQuery function, I tried to use
  RegCreateKeyEx,RegSetValueEx, RegQueryValueEx functions. But these
  function do not work only in this SNMPExtensionQuery function.
  
  I have coded for REstart, Shutdown and Logoff for the MIB functions.
  The code for Restart and Shutdown works fine inside SNMP code.
  The code for logoff does not work inside SNMP code.
  
  Do any others face problem like mine.
  
  Please help me for the above two problems
  
With Regards,
Ranga.



rangampalayam@rediffmail.com (Ranga) wrote in message news:<6e6631b7.0404282109.1fa3df26@posting.google.com>...
> Dear all,
>  
>  I create a SNMP MIB (Extension Agent) in VC++ . 
>  
>  In the SNMPExtensionQuery function, I tried to use
>  RegCreateKeyEx,RegSetValueEx, RegQueryValueEx functions. But these
>  function do not work only in this SNMPExtensionQuery function.
>  
>  I have coded for REstart, Shutdown and Logoff for the MIB functions.
>  The code for Restart and Shutdown works fine inside SNMP code.
>  The code for logoff does not work inside SNMP code.
>  
>  Do any others face problem like mine.
>  
>  Please help me for the above two problems
>  
>  with regards,
>  Ranga.
> 
> 
> 
> rangampalayam@rediffmail.com (Ranga) wrote in message news:<6e6631b7.0404262332.7a66e94a@posting.google.com>...
> > Dear all,
> > 
> > I create a SNMP MIB (Extension Agent) in VC++ . 
> > 
> > In the SNMPExtensionQuery function, I tried to use
> > RegCreateKeyEx,RegSetValueEx, RegQueryValueEx functions. But these
> > function do not work only in this SNMPExtensionQuery function.
> > 
> > I have coded for REstart, Shutdown and Logoff for the MIB functions.
> > The code for Restart and Shutdown works fine inside SNMP code.
> > The code for logoff does not work inside SNMP code.
> > 
> > Do any others face problem like mine.
> > 
> > Please help me for the above two problems
> > 
> > with regards,
> > Ranga.
0
5/1/2004 12:36:49 PM
Instead of multiplying your message, can you provide more details, for
example, code snippet that fails. Otherwise you won't get any useful answer.

"Ranga" <rangampalayam@rediffmail.com> wrote in message
news:6e6631b7.0405010436.7601143e@posting.google.com...
> Hi all,
>
>   I create a SNMP MIB (Extension Agent) in VC++ .
>
>   In the SNMPExtensionQuery function, I tried to use
>   RegCreateKeyEx,RegSetValueEx, RegQueryValueEx functions. But these
>   function do not work only in this SNMPExtensionQuery function.
>
>   I have coded for REstart, Shutdown and Logoff for the MIB functions.
>   The code for Restart and Shutdown works fine inside SNMP code.
>   The code for logoff does not work inside SNMP code.
>
>   Do any others face problem like mine.
>
>   Please help me for the above two problems
>
> With Regards,
> Ranga.
>
>
>
> rangampalayam@rediffmail.com (Ranga) wrote in message
news:<6e6631b7.0404282109.1fa3df26@posting.google.com>...
> > Dear all,
> >
> >  I create a SNMP MIB (Extension Agent) in VC++ .
> >
> >  In the SNMPExtensionQuery function, I tried to use
> >  RegCreateKeyEx,RegSetValueEx, RegQueryValueEx functions. But these
> >  function do not work only in this SNMPExtensionQuery function.
> >
> >  I have coded for REstart, Shutdown and Logoff for the MIB functions.
> >  The code for Restart and Shutdown works fine inside SNMP code.
> >  The code for logoff does not work inside SNMP code.
> >
> >  Do any others face problem like mine.
> >
> >  Please help me for the above two problems
> >
> >  with regards,
> >  Ranga.
> >
> >
> >
> > rangampalayam@rediffmail.com (Ranga) wrote in message
news:<6e6631b7.0404262332.7a66e94a@posting.google.com>...
> > > Dear all,
> > >
> > > I create a SNMP MIB (Extension Agent) in VC++ .
> > >
> > > In the SNMPExtensionQuery function, I tried to use
> > > RegCreateKeyEx,RegSetValueEx, RegQueryValueEx functions. But these
> > > function do not work only in this SNMPExtensionQuery function.
> > >
> > > I have coded for REstart, Shutdown and Logoff for the MIB functions.
> > > The code for Restart and Shutdown works fine inside SNMP code.
> > > The code for logoff does not work inside SNMP code.
> > >
> > > Do any others face problem like mine.
> > >
> > > Please help me for the above two problems
> > >
> > > with regards,
> > > Ranga.


0
alegr (1131)
5/1/2004 2:22:13 PM
Thanks Alexander,

for your useful inputs,

Please find the following Code, in SNMPExtensionInit.

1.  --------------------------------------------------------------------------

I am creating this Extension Agent Dll, where the following LogOff
code appears in SnmpExtensionQuery() function. This code doesnot work.
But instead of LOGOFF, RESTART/SHUTDOWN is present, Restart/Shutdown
works without any problems.


if (!OpenProcessToken(GetCurrentProcess(), 
        TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken)) 
MessageBox("OpenProcessToken failed."); 
 
// Get the LUID for shutdown privilege. 
 
LookupPrivilegeValue(NULL, SE_SHUTDOWN_NAME, 
        &tkp.Privileges[0].Luid); 
 
tkp.PrivilegeCount = 1;  // one privilege to set    
tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; 
 
// Get shutdown privilege for this process. 
 
AdjustTokenPrivileges(hToken, FALSE, &tkp, 0, 
    (PTOKEN_PRIVILEGES) NULL, 0); 
 
// Cannot test the return value of AdjustTokenPrivileges. 
 
if (GetLastError() != ERROR_SUCCESS) 
    MessageBox("AdjustTokenPrivileges enable failed."); 

fResult=ExitWindowsEx(EWX_LOGOFF,0);

if (!fResult) 
{ 
    MessageBox("InitiateSystemShutdown failed."); 
} 
// Disable shutdown privilege. 
 
tkp.Privileges[0].Attributes = 0; 
AdjustTokenPrivileges(hToken, FALSE, &tkp, 0, 
        (PTOKEN_PRIVILEGES) NULL, 0); 

---------------------------------------------------------------------------
This is the detail of this.

With Regards,
Ranga.

"Alexander Grigoriev" <alegr@earthlink.net> wrote in message news:<#MrA2e4LEHA.2592@tk2msftngp13.phx.gbl>...
> Instead of multiplying your message, can you provide more details, for
> example, code snippet that fails. Otherwise you won't get any useful answer.
> 
> "Ranga" <rangampalayam@rediffmail.com> wrote in message
> news:6e6631b7.0405010436.7601143e@posting.google.com...
> > Hi all,
> >
> >   I create a SNMP MIB (Extension Agent) in VC++ .
> >
> >   In the SNMPExtensionQuery function, I tried to use
> >   RegCreateKeyEx,RegSetValueEx, RegQueryValueEx functions. But these
> >   function do not work only in this SNMPExtensionQuery function.
> >
> >   I have coded for REstart, Shutdown and Logoff for the MIB functions.
> >   The code for Restart and Shutdown works fine inside SNMP code.
> >   The code for logoff does not work inside SNMP code.
> >
> >   Do any others face problem like mine.
> >
> >   Please help me for the above two problems
> >
> > With Regards,
> > Ranga.
> >
> >
> >
> > rangampalayam@rediffmail.com (Ranga) wrote in message
>  news:<6e6631b7.0404282109.1fa3df26@posting.google.com>...
> > > Dear all,
> > >
> > >  I create a SNMP MIB (Extension Agent) in VC++ .
> > >
> > >  In the SNMPExtensionQuery function, I tried to use
> > >  RegCreateKeyEx,RegSetValueEx, RegQueryValueEx functions. But these
> > >  function do not work only in this SNMPExtensionQuery function.
> > >
> > >  I have coded for REstart, Shutdown and Logoff for the MIB functions.
> > >  The code for Restart and Shutdown works fine inside SNMP code.
> > >  The code for logoff does not work inside SNMP code.
> > >
> > >  Do any others face problem like mine.
> > >
> > >  Please help me for the above two problems
> > >
> > >  with regards,
> > >  Ranga.
> > >
> > >
> > >
> > > rangampalayam@rediffmail.com (Ranga) wrote in message
>  news:<6e6631b7.0404262332.7a66e94a@posting.google.com>...
> > > > Dear all,
> > > >
> > > > I create a SNMP MIB (Extension Agent) in VC++ .
> > > >
> > > > In the SNMPExtensionQuery function, I tried to use
> > > > RegCreateKeyEx,RegSetValueEx, RegQueryValueEx functions. But these
> > > > function do not work only in this SNMPExtensionQuery function.
> > > >
> > > > I have coded for REstart, Shutdown and Logoff for the MIB functions.
> > > > The code for Restart and Shutdown works fine inside SNMP code.
> > > > The code for logoff does not work inside SNMP code.
> > > >
> > > > Do any others face problem like mine.
> > > >
> > > > Please help me for the above two problems
> > > >
> > > > with regards,
> > > > Ranga.
0
5/3/2004 2:55:02 PM
Under which account and on which desktop the code is running?

"Ranga" <rangampalayam@rediffmail.com> wrote in message
news:6e6631b7.0405030655.1a29e7d5@posting.google.com...
> Thanks Alexander,
>
> for your useful inputs,
>
> Please find the following Code, in SNMPExtensionInit.
>
>
..  -------------------------------------------------------------------------
-
>
> I am creating this Extension Agent Dll, where the following LogOff
> code appears in SnmpExtensionQuery() function. This code doesnot work.
> But instead of LOGOFF, RESTART/SHUTDOWN is present, Restart/Shutdown
> works without any problems.
>
>
> if (!OpenProcessToken(GetCurrentProcess(),
>         TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken))
> MessageBox("OpenProcessToken failed.");
>
> // Get the LUID for shutdown privilege.
>
> LookupPrivilegeValue(NULL, SE_SHUTDOWN_NAME,
>         &tkp.Privileges[0].Luid);
>
> tkp.PrivilegeCount = 1;  // one privilege to set
> tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
>
> // Get shutdown privilege for this process.
>
> AdjustTokenPrivileges(hToken, FALSE, &tkp, 0,
>     (PTOKEN_PRIVILEGES) NULL, 0);
>
> // Cannot test the return value of AdjustTokenPrivileges.
>
> if (GetLastError() != ERROR_SUCCESS)
>     MessageBox("AdjustTokenPrivileges enable failed.");
>
> fResult=ExitWindowsEx(EWX_LOGOFF,0);
>
> if (!fResult)
> {
>     MessageBox("InitiateSystemShutdown failed.");
> }
> // Disable shutdown privilege.
>
> tkp.Privileges[0].Attributes = 0;
> AdjustTokenPrivileges(hToken, FALSE, &tkp, 0,
>         (PTOKEN_PRIVILEGES) NULL, 0);
>
> --------------------------------------------------------------------------
-
> This is the detail of this.
>
> With Regards,
> Ranga.
>
> "Alexander Grigoriev" <alegr@earthlink.net> wrote in message
news:<#MrA2e4LEHA.2592@tk2msftngp13.phx.gbl>...
> > Instead of multiplying your message, can you provide more details, for
> > example, code snippet that fails. Otherwise you won't get any useful
answer.
> >
> > "Ranga" <rangampalayam@rediffmail.com> wrote in message
> > news:6e6631b7.0405010436.7601143e@posting.google.com...
> > > Hi all,
> > >
> > >   I create a SNMP MIB (Extension Agent) in VC++ .
> > >
> > >   In the SNMPExtensionQuery function, I tried to use
> > >   RegCreateKeyEx,RegSetValueEx, RegQueryValueEx functions. But these
> > >   function do not work only in this SNMPExtensionQuery function.
> > >
> > >   I have coded for REstart, Shutdown and Logoff for the MIB functions.
> > >   The code for Restart and Shutdown works fine inside SNMP code.
> > >   The code for logoff does not work inside SNMP code.
> > >
> > >   Do any others face problem like mine.
> > >
> > >   Please help me for the above two problems
> > >
> > > With Regards,
> > > Ranga.
> > >
> > >
> > >
> > > rangampalayam@rediffmail.com (Ranga) wrote in message
> >  news:<6e6631b7.0404282109.1fa3df26@posting.google.com>...
> > > > Dear all,
> > > >
> > > >  I create a SNMP MIB (Extension Agent) in VC++ .
> > > >
> > > >  In the SNMPExtensionQuery function, I tried to use
> > > >  RegCreateKeyEx,RegSetValueEx, RegQueryValueEx functions. But these
> > > >  function do not work only in this SNMPExtensionQuery function.
> > > >
> > > >  I have coded for REstart, Shutdown and Logoff for the MIB
functions.
> > > >  The code for Restart and Shutdown works fine inside SNMP code.
> > > >  The code for logoff does not work inside SNMP code.
> > > >
> > > >  Do any others face problem like mine.
> > > >
> > > >  Please help me for the above two problems
> > > >
> > > >  with regards,
> > > >  Ranga.
> > > >
> > > >
> > > >
> > > > rangampalayam@rediffmail.com (Ranga) wrote in message
> >  news:<6e6631b7.0404262332.7a66e94a@posting.google.com>...
> > > > > Dear all,
> > > > >
> > > > > I create a SNMP MIB (Extension Agent) in VC++ .
> > > > >
> > > > > In the SNMPExtensionQuery function, I tried to use
> > > > > RegCreateKeyEx,RegSetValueEx, RegQueryValueEx functions. But these
> > > > > function do not work only in this SNMPExtensionQuery function.
> > > > >
> > > > > I have coded for REstart, Shutdown and Logoff for the MIB
functions.
> > > > > The code for Restart and Shutdown works fine inside SNMP code.
> > > > > The code for logoff does not work inside SNMP code.
> > > > >
> > > > > Do any others face problem like mine.
> > > > >
> > > > > Please help me for the above two problems
> > > > >
> > > > > with regards,
> > > > > Ranga.


0
alegr (1131)
5/4/2004 5:01:46 AM
Thanks Alexander very much for your response.

Account -- Administrator;
Desktop -- Normal Desktop;

Even MessageBox(0,"Message","Caption",MB_OK) does not prop up, inside
SNMPExtensionQuery Function().

I am writing an SNMP Extension DLL. I have written the code, in such a
way, that whenever I queried from an SNMP Manager, I have change some
registry settings, Logoff/Restart/Shutdown the system, show some
MessageBoxes.

I am able to restart and shutdown the system. But I could not Logoff
from the System.

Also, RegOpenKeyEx, RegQueryValueEx, MessageBox() APIs DONOT work.

I hope that this would be helpful for you to help me.

With Regards,
Ranga.


"Alexander Grigoriev" <alegr@earthlink.net> wrote in message news:<##GIoTZMEHA.340@TK2MSFTNGP11.phx.gbl>...
> Under which account and on which desktop the code is running?
> 
> "Ranga" <rangampalayam@rediffmail.com> wrote in message
> news:6e6631b7.0405030655.1a29e7d5@posting.google.com...
> > Thanks Alexander,
> >
> > for your useful inputs,
> >
> > Please find the following Code, in SNMPExtensionInit.
> >
> >
> .  -------------------------------------------------------------------------
> -
> >
> > I am creating this Extension Agent Dll, where the following LogOff
> > code appears in SnmpExtensionQuery() function. This code doesnot work.
> > But instead of LOGOFF, RESTART/SHUTDOWN is present, Restart/Shutdown
> > works without any problems.
> >
> >
> > if (!OpenProcessToken(GetCurrentProcess(),
> >         TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken))
> > MessageBox("OpenProcessToken failed.");
> >
> > // Get the LUID for shutdown privilege.
> >
> > LookupPrivilegeValue(NULL, SE_SHUTDOWN_NAME,
> >         &tkp.Privileges[0].Luid);
> >
> > tkp.PrivilegeCount = 1;  // one privilege to set
> > tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
> >
> > // Get shutdown privilege for this process.
> >
> > AdjustTokenPrivileges(hToken, FALSE, &tkp, 0,
> >     (PTOKEN_PRIVILEGES) NULL, 0);
> >
> > // Cannot test the return value of AdjustTokenPrivileges.
> >
> > if (GetLastError() != ERROR_SUCCESS)
> >     MessageBox("AdjustTokenPrivileges enable failed.");
> >
> > fResult=ExitWindowsEx(EWX_LOGOFF,0);
> >
> > if (!fResult)
> > {
> >     MessageBox("InitiateSystemShutdown failed.");
> > }
> > // Disable shutdown privilege.
> >
> > tkp.Privileges[0].Attributes = 0;
> > AdjustTokenPrivileges(hToken, FALSE, &tkp, 0,
> >         (PTOKEN_PRIVILEGES) NULL, 0);
> >
> > --------------------------------------------------------------------------
>  -
> > This is the detail of this.
> >
> > With Regards,
> > Ranga.
> >
> > "Alexander Grigoriev" <alegr@earthlink.net> wrote in message
>  news:<#MrA2e4LEHA.2592@tk2msftngp13.phx.gbl>...
> > > Instead of multiplying your message, can you provide more details, for
> > > example, code snippet that fails. Otherwise you won't get any useful
>  answer.
> > >
> > > "Ranga" <rangampalayam@rediffmail.com> wrote in message
> > > news:6e6631b7.0405010436.7601143e@posting.google.com...
> > > > Hi all,
> > > >
> > > >   I create a SNMP MIB (Extension Agent) in VC++ .
> > > >
> > > >   In the SNMPExtensionQuery function, I tried to use
> > > >   RegCreateKeyEx,RegSetValueEx, RegQueryValueEx functions. But these
> > > >   function do not work only in this SNMPExtensionQuery function.
> > > >
> > > >   I have coded for REstart, Shutdown and Logoff for the MIB functions.
> > > >   The code for Restart and Shutdown works fine inside SNMP code.
> > > >   The code for logoff does not work inside SNMP code.
> > > >
> > > >   Do any others face problem like mine.
> > > >
> > > >   Please help me for the above two problems
> > > >
> > > > With Regards,
> > > > Ranga.
> > > >
> > > >
> > > >
> > > > rangampalayam@rediffmail.com (Ranga) wrote in message
>  news:<6e6631b7.0404282109.1fa3df26@posting.google.com>...
> > > > > Dear all,
> > > > >
> > > > >  I create a SNMP MIB (Extension Agent) in VC++ .
> > > > >
> > > > >  In the SNMPExtensionQuery function, I tried to use
> > > > >  RegCreateKeyEx,RegSetValueEx, RegQueryValueEx functions. But these
> > > > >  function do not work only in this SNMPExtensionQuery function.
> > > > >
> > > > >  I have coded for REstart, Shutdown and Logoff for the MIB
>  functions.
> > > > >  The code for Restart and Shutdown works fine inside SNMP code.
> > > > >  The code for logoff does not work inside SNMP code.
> > > > >
> > > > >  Do any others face problem like mine.
> > > > >
> > > > >  Please help me for the above two problems
> > > > >
> > > > >  with regards,
> > > > >  Ranga.
> > > > >
> > > > >
> > > > >
> > > > > rangampalayam@rediffmail.com (Ranga) wrote in message
>  news:<6e6631b7.0404262332.7a66e94a@posting.google.com>...
> > > > > > Dear all,
> > > > > >
> > > > > > I create a SNMP MIB (Extension Agent) in VC++ .
> > > > > >
> > > > > > In the SNMPExtensionQuery function, I tried to use
> > > > > > RegCreateKeyEx,RegSetValueEx, RegQueryValueEx functions. But these
> > > > > > function do not work only in this SNMPExtensionQuery function.
> > > > > >
> > > > > > I have coded for REstart, Shutdown and Logoff for the MIB
>  functions.
> > > > > > The code for Restart and Shutdown works fine inside SNMP code.
> > > > > > The code for logoff does not work inside SNMP code.
> > > > > >
> > > > > > Do any others face problem like mine.
> > > > > >
> > > > > > Please help me for the above two problems
> > > > > >
> > > > > > with regards,
> > > > > > Ranga.
0
5/4/2004 2:43:19 PM
In which process is your SNMP extension DLL loaded?
What keys are you trying to open with RegOpenKey function? Can you post the
code snippet?

"Ranga" <rangampalayam@rediffmail.com> wrote in message
news:6e6631b7.0405040643.51f4c13a@posting.google.com...
> Thanks Alexander very much for your response.
>
> Account -- Administrator;
> Desktop -- Normal Desktop;
>
> Even MessageBox(0,"Message","Caption",MB_OK) does not prop up, inside
> SNMPExtensionQuery Function().
>
> I am writing an SNMP Extension DLL. I have written the code, in such a
> way, that whenever I queried from an SNMP Manager, I have change some
> registry settings, Logoff/Restart/Shutdown the system, show some
> MessageBoxes.
>
> I am able to restart and shutdown the system. But I could not Logoff
> from the System.
>
> Also, RegOpenKeyEx, RegQueryValueEx, MessageBox() APIs DONOT work.
>
> I hope that this would be helpful for you to help me.
>
> With Regards,
> Ranga.
>
>
> "Alexander Grigoriev" <alegr@earthlink.net> wrote in message
news:<##GIoTZMEHA.340@TK2MSFTNGP11.phx.gbl>...
> > Under which account and on which desktop the code is running?
> >
> > "Ranga" <rangampalayam@rediffmail.com> wrote in message
> > news:6e6631b7.0405030655.1a29e7d5@posting.google.com...
> > > Thanks Alexander,
> > >
> > > for your useful inputs,
> > >
> > > Please find the following Code, in SNMPExtensionInit.
> > >
> > >
> >
  -------------------------------------------------------------------------
> > -
> > >
> > > I am creating this Extension Agent Dll, where the following LogOff
> > > code appears in SnmpExtensionQuery() function. This code doesnot work.
> > > But instead of LOGOFF, RESTART/SHUTDOWN is present, Restart/Shutdown
> > > works without any problems.
> > >
> > >
> > > if (!OpenProcessToken(GetCurrentProcess(),
> > >         TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken))
> > > MessageBox("OpenProcessToken failed.");
> > >
> > > // Get the LUID for shutdown privilege.
> > >
> > > LookupPrivilegeValue(NULL, SE_SHUTDOWN_NAME,
> > >         &tkp.Privileges[0].Luid);
> > >
> > > tkp.PrivilegeCount = 1;  // one privilege to set
> > > tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
> > >
> > > // Get shutdown privilege for this process.
> > >
> > > AdjustTokenPrivileges(hToken, FALSE, &tkp, 0,
> > >     (PTOKEN_PRIVILEGES) NULL, 0);
> > >
> > > // Cannot test the return value of AdjustTokenPrivileges.
> > >
> > > if (GetLastError() != ERROR_SUCCESS)
> > >     MessageBox("AdjustTokenPrivileges enable failed.");
> > >
> > > fResult=ExitWindowsEx(EWX_LOGOFF,0);
> > >
> > > if (!fResult)
> > > {
> > >     MessageBox("InitiateSystemShutdown failed.");
> > > }
> > > // Disable shutdown privilege.
> > >
> > > tkp.Privileges[0].Attributes = 0;
> > > AdjustTokenPrivileges(hToken, FALSE, &tkp, 0,
> > >         (PTOKEN_PRIVILEGES) NULL, 0);
> > >
> >
> --------------------------------------------------------------------------
> >  -
> > > This is the detail of this.
> > >
> > > With Regards,
> > > Ranga.
> > >
> > > "Alexander Grigoriev" <alegr@earthlink.net> wrote in message
> >  news:<#MrA2e4LEHA.2592@tk2msftngp13.phx.gbl>...
> > > > Instead of multiplying your message, can you provide more details,
for
> > > > example, code snippet that fails. Otherwise you won't get any useful
> >  answer.
> > > >
> > > > "Ranga" <rangampalayam@rediffmail.com> wrote in message
> > > > news:6e6631b7.0405010436.7601143e@posting.google.com...
> > > > > Hi all,
> > > > >
> > > > >   I create a SNMP MIB (Extension Agent) in VC++ .
> > > > >
> > > > >   In the SNMPExtensionQuery function, I tried to use
> > > > >   RegCreateKeyEx,RegSetValueEx, RegQueryValueEx functions. But
these
> > > > >   function do not work only in this SNMPExtensionQuery function.
> > > > >
> > > > >   I have coded for REstart, Shutdown and Logoff for the MIB
functions.
> > > > >   The code for Restart and Shutdown works fine inside SNMP code.
> > > > >   The code for logoff does not work inside SNMP code.
> > > > >
> > > > >   Do any others face problem like mine.
> > > > >
> > > > >   Please help me for the above two problems
> > > > >
> > > > > With Regards,
> > > > > Ranga.
> > > > >
> > > > >
> > > > >
> > > > > rangampalayam@rediffmail.com (Ranga) wrote in message
> >  news:<6e6631b7.0404282109.1fa3df26@posting.google.com>...
> > > > > > Dear all,
> > > > > >
> > > > > >  I create a SNMP MIB (Extension Agent) in VC++ .
> > > > > >
> > > > > >  In the SNMPExtensionQuery function, I tried to use
> > > > > >  RegCreateKeyEx,RegSetValueEx, RegQueryValueEx functions. But
these
> > > > > >  function do not work only in this SNMPExtensionQuery function.
> > > > > >
> > > > > >  I have coded for REstart, Shutdown and Logoff for the MIB
> >  functions.
> > > > > >  The code for Restart and Shutdown works fine inside SNMP code.
> > > > > >  The code for logoff does not work inside SNMP code.
> > > > > >
> > > > > >  Do any others face problem like mine.
> > > > > >
> > > > > >  Please help me for the above two problems
> > > > > >
> > > > > >  with regards,
> > > > > >  Ranga.
> > > > > >
> > > > > >
> > > > > >
> > > > > > rangampalayam@rediffmail.com (Ranga) wrote in message
> >  news:<6e6631b7.0404262332.7a66e94a@posting.google.com>...
> > > > > > > Dear all,
> > > > > > >
> > > > > > > I create a SNMP MIB (Extension Agent) in VC++ .
> > > > > > >
> > > > > > > In the SNMPExtensionQuery function, I tried to use
> > > > > > > RegCreateKeyEx,RegSetValueEx, RegQueryValueEx functions. But
these
> > > > > > > function do not work only in this SNMPExtensionQuery function.
> > > > > > >
> > > > > > > I have coded for REstart, Shutdown and Logoff for the MIB
> >  functions.
> > > > > > > The code for Restart and Shutdown works fine inside SNMP code.
> > > > > > > The code for logoff does not work inside SNMP code.
> > > > > > >
> > > > > > > Do any others face problem like mine.
> > > > > > >
> > > > > > > Please help me for the above two problems
> > > > > > >
> > > > > > > with regards,
> > > > > > > Ranga.


0
alegr (1131)
5/5/2004 4:20:16 AM
Dear Alexander,

This snmp extension DLL is loaded when the SNMP Service is started.

I am listing the following functions that does not work in the
SNMPExtensionQuery function

1. MessageBox(NULL,"Message","Caption",NULL);

2. System("notepad");

3. HKEY hKey;
   RegOpenKeyEx(HKEY_LOCAL_MACHINE,"SYSTEM\TEST",0,KEY_ALL_ACCESS,&hKey);

But at the same time, I remind you the above said APIs worked well
without any problems from other DLL functions.

With Regards,
Ranga.

"Alexander Grigoriev" <alegr@earthlink.net> wrote in message news:<##biHhlMEHA.2388@TK2MSFTNGP09.phx.gbl>...
> In which process is your SNMP extension DLL loaded?
> What keys are you trying to open with RegOpenKey function? Can you post the
> code snippet?
> 
> "Ranga" <rangampalayam@rediffmail.com> wrote in message
> news:6e6631b7.0405040643.51f4c13a@posting.google.com...
> > Thanks Alexander very much for your response.
> >
> > Account -- Administrator;
> > Desktop -- Normal Desktop;
> >
> > Even MessageBox(0,"Message","Caption",MB_OK) does not prop up, inside
> > SNMPExtensionQuery Function().
> >
> > I am writing an SNMP Extension DLL. I have written the code, in such a
> > way, that whenever I queried from an SNMP Manager, I have change some
> > registry settings, Logoff/Restart/Shutdown the system, show some
> > MessageBoxes.
> >
> > I am able to restart and shutdown the system. But I could not Logoff
> > from the System.
> >
> > Also, RegOpenKeyEx, RegQueryValueEx, MessageBox() APIs DONOT work.
> >
> > I hope that this would be helpful for you to help me.
> >
> > With Regards,
> > Ranga.
> >
> >
> > "Alexander Grigoriev" <alegr@earthlink.net> wrote in message
>  news:<##GIoTZMEHA.340@TK2MSFTNGP11.phx.gbl>...
> > > Under which account and on which desktop the code is running?
> > >
> > > "Ranga" <rangampalayam@rediffmail.com> wrote in message
> > > news:6e6631b7.0405030655.1a29e7d5@posting.google.com...
> > > > Thanks Alexander,
> > > >
> > > > for your useful inputs,
> > > >
> > > > Please find the following Code, in SNMPExtensionInit.
> > > >
> > > >
> > >
>  -------------------------------------------------------------------------
> > > -
> > > >
> > > > I am creating this Extension Agent Dll, where the following LogOff
> > > > code appears in SnmpExtensionQuery() function. This code doesnot work.
> > > > But instead of LOGOFF, RESTART/SHUTDOWN is present, Restart/Shutdown
> > > > works without any problems.
> > > >
> > > >
> > > > if (!OpenProcessToken(GetCurrentProcess(),
> > > >         TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken))
> > > > MessageBox("OpenProcessToken failed.");
> > > >
> > > > // Get the LUID for shutdown privilege.
> > > >
> > > > LookupPrivilegeValue(NULL, SE_SHUTDOWN_NAME,
> > > >         &tkp.Privileges[0].Luid);
> > > >
> > > > tkp.PrivilegeCount = 1;  // one privilege to set
> > > > tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
> > > >
> > > > // Get shutdown privilege for this process.
> > > >
> > > > AdjustTokenPrivileges(hToken, FALSE, &tkp, 0,
> > > >     (PTOKEN_PRIVILEGES) NULL, 0);
> > > >
> > > > // Cannot test the return value of AdjustTokenPrivileges.
> > > >
> > > > if (GetLastError() != ERROR_SUCCESS)
> > > >     MessageBox("AdjustTokenPrivileges enable failed.");
> > > >
> > > > fResult=ExitWindowsEx(EWX_LOGOFF,0);
> > > >
> > > > if (!fResult)
> > > > {
> > > >     MessageBox("InitiateSystemShutdown failed.");
> > > > }
> > > > // Disable shutdown privilege.
> > > >
> > > > tkp.Privileges[0].Attributes = 0;
> > > > AdjustTokenPrivileges(hToken, FALSE, &tkp, 0,
> > > >         (PTOKEN_PRIVILEGES) NULL, 0);
> > > >
> > >
>  --------------------------------------------------------------------------
> > >  -
> > > > This is the detail of this.
> > > >
> > > > With Regards,
> > > > Ranga.
> > > >
> > > > "Alexander Grigoriev" <alegr@earthlink.net> wrote in message
>  news:<#MrA2e4LEHA.2592@tk2msftngp13.phx.gbl>...
> > > > > Instead of multiplying your message, can you provide more details,
>  for
> > > > > example, code snippet that fails. Otherwise you won't get any useful
>  answer.
> > > > >
> > > > > "Ranga" <rangampalayam@rediffmail.com> wrote in message
> > > > > news:6e6631b7.0405010436.7601143e@posting.google.com...
> > > > > > Hi all,
> > > > > >
> > > > > >   I create a SNMP MIB (Extension Agent) in VC++ .
> > > > > >
> > > > > >   In the SNMPExtensionQuery function, I tried to use
> > > > > >   RegCreateKeyEx,RegSetValueEx, RegQueryValueEx functions. But
>  these
> > > > > >   function do not work only in this SNMPExtensionQuery function.
> > > > > >
> > > > > >   I have coded for REstart, Shutdown and Logoff for the MIB
>  functions.
> > > > > >   The code for Restart and Shutdown works fine inside SNMP code.
> > > > > >   The code for logoff does not work inside SNMP code.
> > > > > >
> > > > > >   Do any others face problem like mine.
> > > > > >
> > > > > >   Please help me for the above two problems
> > > > > >
> > > > > > With Regards,
> > > > > > Ranga.
> > > > > >
> > > > > >
> > > > > >
> > > > > > rangampalayam@rediffmail.com (Ranga) wrote in message
>  news:<6e6631b7.0404282109.1fa3df26@posting.google.com>...
> > > > > > > Dear all,
> > > > > > >
> > > > > > >  I create a SNMP MIB (Extension Agent) in VC++ .
> > > > > > >
> > > > > > >  In the SNMPExtensionQuery function, I tried to use
> > > > > > >  RegCreateKeyEx,RegSetValueEx, RegQueryValueEx functions. But
>  these
> > > > > > >  function do not work only in this SNMPExtensionQuery function.
> > > > > > >
> > > > > > >  I have coded for REstart, Shutdown and Logoff for the MIB
>  functions.
> > > > > > >  The code for Restart and Shutdown works fine inside SNMP code.
> > > > > > >  The code for logoff does not work inside SNMP code.
> > > > > > >
> > > > > > >  Do any others face problem like mine.
> > > > > > >
> > > > > > >  Please help me for the above two problems
> > > > > > >
> > > > > > >  with regards,
> > > > > > >  Ranga.
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > rangampalayam@rediffmail.com (Ranga) wrote in message
>  news:<6e6631b7.0404262332.7a66e94a@posting.google.com>...
> > > > > > > > Dear all,
> > > > > > > >
> > > > > > > > I create a SNMP MIB (Extension Agent) in VC++ .
> > > > > > > >
> > > > > > > > In the SNMPExtensionQuery function, I tried to use
> > > > > > > > RegCreateKeyEx,RegSetValueEx, RegQueryValueEx functions. But
>  these
> > > > > > > > function do not work only in this SNMPExtensionQuery function.
> > > > > > > >
> > > > > > > > I have coded for REstart, Shutdown and Logoff for the MIB
>  functions.
> > > > > > > > The code for Restart and Shutdown works fine inside SNMP code.
> > > > > > > > The code for logoff does not work inside SNMP code.
> > > > > > > >
> > > > > > > > Do any others face problem like mine.
> > > > > > > >
> > > > > > > > Please help me for the above two problems
> > > > > > > >
> > > > > > > > with regards,
> > > > > > > > Ranga.
0
5/6/2004 4:50:47 AM
Ranga wrote:

>    RegOpenKeyEx(HKEY_LOCAL_MACHINE,"SYSTEM\TEST",0,KEY_ALL_ACCESS,&hKey);

Remember double backslash in C language string constants, your example 
should be:
RegOpenKeyEx(HKEY_LOCAL_MACHINE,"SYSTEM\\TEST",0,KEY_ALL_ACCESS,&hKey);

-- 
Olof Lagerkvist
ICQ: 724451
Web page: http://here.is/olof

0
no3581 (99)
5/6/2004 6:19:12 PM
Thanks Olof,

for your response.

missing that '\' is a typographical mistake that took place when I
typed the message here.

apart from that, can you simulate the error, using MessageBox() and
system() functions.

Please help me in this regard.

With Regards,
Ranga.

rangampalayam@rediffmail.com (Ranga) wrote in message news:<6e6631b7.0405040643.51f4c13a@posting.google.com>...
> Thanks Alexander very much for your response.
> 
> Account -- Administrator;
> Desktop -- Normal Desktop;
> 
> Even MessageBox(0,"Message","Caption",MB_OK) does not prop up, inside
> SNMPExtensionQuery Function().
> 
> I am writing an SNMP Extension DLL. I have written the code, in such a
> way, that whenever I queried from an SNMP Manager, I have change some
> registry settings, Logoff/Restart/Shutdown the system, show some
> MessageBoxes.
> 
> I am able to restart and shutdown the system. But I could not Logoff
> from the System.
> 
> Also, RegOpenKeyEx, RegQueryValueEx, MessageBox() APIs DONOT work.
> 
> I hope that this would be helpful for you to help me.
> 
> With Regards,
> Ranga.
> 
> 
> "Alexander Grigoriev" <alegr@earthlink.net> wrote in message news:<##GIoTZMEHA.340@TK2MSFTNGP11.phx.gbl>...
> > Under which account and on which desktop the code is running?
> > 
> > "Ranga" <rangampalayam@rediffmail.com> wrote in message
> > news:6e6631b7.0405030655.1a29e7d5@posting.google.com...
> > > Thanks Alexander,
> > >
> > > for your useful inputs,
> > >
> > > Please find the following Code, in SNMPExtensionInit.
> > >
> > >
> > .  -------------------------------------------------------------------------
> > -
> > >
> > > I am creating this Extension Agent Dll, where the following LogOff
> > > code appears in SnmpExtensionQuery() function. This code doesnot work.
> > > But instead of LOGOFF, RESTART/SHUTDOWN is present, Restart/Shutdown
> > > works without any problems.
> > >
> > >
> > > if (!OpenProcessToken(GetCurrentProcess(),
> > >         TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken))
> > > MessageBox("OpenProcessToken failed.");
> > >
> > > // Get the LUID for shutdown privilege.
> > >
> > > LookupPrivilegeValue(NULL, SE_SHUTDOWN_NAME,
> > >         &tkp.Privileges[0].Luid);
> > >
> > > tkp.PrivilegeCount = 1;  // one privilege to set
> > > tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
> > >
> > > // Get shutdown privilege for this process.
> > >
> > > AdjustTokenPrivileges(hToken, FALSE, &tkp, 0,
> > >     (PTOKEN_PRIVILEGES) NULL, 0);
> > >
> > > // Cannot test the return value of AdjustTokenPrivileges.
> > >
> > > if (GetLastError() != ERROR_SUCCESS)
> > >     MessageBox("AdjustTokenPrivileges enable failed.");
> > >
> > > fResult=ExitWindowsEx(EWX_LOGOFF,0);
> > >
> > > if (!fResult)
> > > {
> > >     MessageBox("InitiateSystemShutdown failed.");
> > > }
> > > // Disable shutdown privilege.
> > >
> > > tkp.Privileges[0].Attributes = 0;
> > > AdjustTokenPrivileges(hToken, FALSE, &tkp, 0,
> > >         (PTOKEN_PRIVILEGES) NULL, 0);
> > >
> > > --------------------------------------------------------------------------
>  -
> > > This is the detail of this.
> > >
> > > With Regards,
> > > Ranga.
> > >
> > > "Alexander Grigoriev" <alegr@earthlink.net> wrote in message
>  news:<#MrA2e4LEHA.2592@tk2msftngp13.phx.gbl>...
> > > > Instead of multiplying your message, can you provide more details, for
> > > > example, code snippet that fails. Otherwise you won't get any useful
>  answer.
> > > >
> > > > "Ranga" <rangampalayam@rediffmail.com> wrote in message
> > > > news:6e6631b7.0405010436.7601143e@posting.google.com...
> > > > > Hi all,
> > > > >
> > > > >   I create a SNMP MIB (Extension Agent) in VC++ .
> > > > >
> > > > >   In the SNMPExtensionQuery function, I tried to use
> > > > >   RegCreateKeyEx,RegSetValueEx, RegQueryValueEx functions. But these
> > > > >   function do not work only in this SNMPExtensionQuery function.
> > > > >
> > > > >   I have coded for REstart, Shutdown and Logoff for the MIB functions.
> > > > >   The code for Restart and Shutdown works fine inside SNMP code.
> > > > >   The code for logoff does not work inside SNMP code.
> > > > >
> > > > >   Do any others face problem like mine.
> > > > >
> > > > >   Please help me for the above two problems
> > > > >
> > > > > With Regards,
> > > > > Ranga.
> > > > >
> > > > >
> > > > >
> > > > > rangampalayam@rediffmail.com (Ranga) wrote in message
>  news:<6e6631b7.0404282109.1fa3df26@posting.google.com>...
> > > > > > Dear all,
> > > > > >
> > > > > >  I create a SNMP MIB (Extension Agent) in VC++ .
> > > > > >
> > > > > >  In the SNMPExtensionQuery function, I tried to use
> > > > > >  RegCreateKeyEx,RegSetValueEx, RegQueryValueEx functions. But these
> > > > > >  function do not work only in this SNMPExtensionQuery function.
> > > > > >
> > > > > >  I have coded for REstart, Shutdown and Logoff for the MIB
>  functions.
> > > > > >  The code for Restart and Shutdown works fine inside SNMP code.
> > > > > >  The code for logoff does not work inside SNMP code.
> > > > > >
> > > > > >  Do any others face problem like mine.
> > > > > >
> > > > > >  Please help me for the above two problems
> > > > > >
> > > > > >  with regards,
> > > > > >  Ranga.
> > > > > >
> > > > > >
> > > > > >
> > > > > > rangampalayam@rediffmail.com (Ranga) wrote in message
>  news:<6e6631b7.0404262332.7a66e94a@posting.google.com>...
> > > > > > > Dear all,
> > > > > > >
> > > > > > > I create a SNMP MIB (Extension Agent) in VC++ .
> > > > > > >
> > > > > > > In the SNMPExtensionQuery function, I tried to use
> > > > > > > RegCreateKeyEx,RegSetValueEx, RegQueryValueEx functions. But these
> > > > > > > function do not work only in this SNMPExtensionQuery function.
> > > > > > >
> > > > > > > I have coded for REstart, Shutdown and Logoff for the MIB
>  functions.
> > > > > > > The code for Restart and Shutdown works fine inside SNMP code.
> > > > > > > The code for logoff does not work inside SNMP code.
> > > > > > >
> > > > > > > Do any others face problem like mine.
> > > > > > >
> > > > > > > Please help me for the above two problems
> > > > > > >
> > > > > > > with regards,
> > > > > > > Ranga.
0
5/7/2004 10:23:07 AM
Reply:

Similar Artilces:

Sync Problem with Bank
I am using MSMNY03 Deluxe. There is a transaction in my checking account register that is marked as Cleared from online services ( "E" appears in the C column ). This transaction is actually an EPAY that is scheduled for payment on NOVEMBER 6th, 2003. When I ask to show payment status, it tells me that the transaction cleared on OCTOBER 6th, 2003. I queried my bank via eMail and they tell me that the transaction is properly scheduled in the queue for payment on NOV 6th. How can I change the status marking in the checkbook register from "E" to be "blank" ...

Interesting problem
Hello: I am running Exchange 2003 and installed Exchange System Manager on my XP workstation too When I login into Exchange 2003 Console, the database is mounted and is accessible. But if I acces the Exchange 2003 using Exchange System Manager from my XP workstation, the database is not moun and not accessible. The server is running fine. What could of happened here ...

Sorting Problem 05-22-07
I created a Db to keep standings for a Youth Baseball league. Approximately 105 teams spread over 6 age groups. It works great for entering the game scores. However, it has a problem sorting the standings. The standings should be based on Winning Percentage in a descending order. The report is based of a query that does the calculation based on the number of wins divided by the number of games. The Query sorts the Standings correctly, but then the report prints out, it has problems. problem seems to be at the 2nd decimal point and beyond. For example the standings might be ...

access problems
Hi, I have setup Vista (a reisntall of the OS) with a username who is also an administrtator but need to find some files within the hidden files and folders (documents and settings/user ...etc). When I try to access the documents and settings folder I am denied access. How can I gain access as default to all files on the computer. I am administrator. Cheers Try it. <http://www.howtogeek.com/howto/windows-vista/add-take-ownership-to-explorer-right-click-menu-in-vista/> -- "Lenny109" wrote: > Hi, > I have setup Vista (a reisntall of the OS) w...

Outlook 2002
I have two users that when they click "send" the message goes into the outbox and will not send until "send and receive" is clicked. Both have the "Send Immediately When Connected" box selected. Also, one user cannot send more than one message at a time. If he has more than one message in the outbox, he has to remove all but one and do manual send and receive, then move 1 message to the outbox and repeat for all messages. Both users have laptops with XP Pro, Office XP Pro, and POP3 mail. Art ...

Need help utilizing the "Like" function
Using Excel 2003, here is example code that doesn't work. What am I doing wrong? My isNumeric test returns "True", but there an "A" in my string. Am I not checking for all the character to be 0 - 9? Sub Test1() Debug.Print isNumeric("A00101") End Sub Function isNumeric(ByVal sInput As String) As Boolean If sInput Like "*[0-9]" Then isNumeric = True Else isNumeric = False End If End Function Thanks, - Pat Dreiding - I am not sure why you aren't using Excel's functions, but here is why your's ...

SP Install Problem
After a new install of GP 10 and Sql 2008, I tried to install SP3 and got the following error: the version of dynamics gp on the client does not match the version of dynamics gp on the sql server Any ideas what went wrong? jon@netseca.com -- John John, You might have some modules not properly upgraded, check "DU000020" table for more information. Regards, -- Mohammad R. Daoud MVP, MCP, MCBMSP, MCTS, MCBMSS Mob: +962 - 79 -999 65 85 Great Package For Business Solutions daoudm@greatpbs.com http://www.greatpbs.com http://mohdaoud.blogspot.com/ "John" wrote: > A...

Slightly different renaming problem
I gave an existing exchange account to a new employee (old one left company) and went thru ADUC to make all the necessary changes including on the E-mail Addresses tab for both SMTP and X400 types. Everything seems to be working fine and incoming/outgoing mail but I can't get the display name (Mailbox-Old Employee) at the top of the folders to change. What have I missed? Did you change the user's display name in AD? James Chong MCSE | M+, S+, MCTS, Security+ msexchangetips.blogspot.com Karen wrote: > I gave an existing exchange account to a new employee (old one left compan...

simple data selection problem
hi to all, how could i select (highlight) all data in a column. you see i have 2345 rows in a column and scrolling down till the end somtimes becomes a problem thanks sev Hi Sev, One way is to enter A1:A2345 in the name box and hit enter. Another is to name the range so all you have to do is click on the name in the name box drop down list. Or you could just click on the column heading, but that will select the entire 65000+ rows and that may not work for you. HTH Regards, Howard "seven" <s_e_v_e_n@swissonline.ch> wrote in message news:3f00967d@news.swissonline.ch.....

Problem with accounts
I have an exchange 2k3 server and have been running it for well over a year. When I added a new user this week for some reason I keep getting this strange error when setting up the email account in outlook. ERROR: The name could not be resolved. the name could not be matched to a name in the address list. I have checked the name several times and log on to OWA with no problems. Is there a way to rebuild the address list? TIA Hi, Please check the below KB articles. http://support.microsoft.com/kb/297801/EN-US/ http://support.microsoft.com/kb/903295/en-us#top Yes, you can rebuild th...

Problem solved
I have downloaded the updates for windows, as i realised it's now an older version of windows etc. Outlook works fine now :) Marjon. ...

Publisher printing problems
My employer is running for office and asked me to make up some flyers in Publisher that he could have printed and cut into thirds. I have all my margins set to zero, but when I use the print preview, the left margin cuts off part of the image. I'm unsure whether it's Publisher or the printer doing this; let's just say, regardless, my employer has an array of flyer sizes due to the way I had to position them. I'm using Publisher 2003 and the HP Officejet Pro L7555 All-in-one printer (however, we're having them printed at OfficeMax, so I'm assuming the problem is in P...

Budget problem in 2005 #2
I have previously setup my budget in MS 2004. When I upgraded to 2005, the default setting is Essential budget. When I click the link to switch to the Advanced setting - it cycles like the program is trying to do something but ultimately defaults back to the original essential view. Is there a way to repair this problem in '05? Steve I would guess a repair on the file would be the first point of call. Take a backup of the file and then use the repair options on the file-> menu -- Glyn Simpson, Microsoft MVP - Money http://money.mvps.org Check http://support.microsoft.com/defaul...

problem..
I have a problem, here is structure: sheet1 a1 "text" sheet2 a1 "text" a2 number "2" In sheet1 (a3) I need to write some formula which will search for word "text" from sheet1 in sheet2, and when it founds word" text" in sheet2 it needs to write number in sheet1(a3) which stands by word "text" in sheet 2( in this case sheet2(a2= number 2)). Do you understand what I want? Thank you! =INDEX(Sheet2!$A$1:$A$1000,MATCH(A1,Sheet2!$A$1:$A$1000,0)+1) -- Regards, Peo Sjoblom "KisH (Tihomir)" <kish89MAKNI@gmail.com...

having a problem creating a histogram with an in between range
excel's standard graphs do not allow me to do an in between range for a histogram. Is there any way I can make each bar a range instead of a number with no spaces between bars? here's a drawing of what I'm looking for: http://img140.imageshack.us/img140/2511/histogramzi0.jpg ...

Contacts Folder Problem
Outlook version: 2003 When in a Distribution List, I click on [Select Members] and get this MS Office Outlook message: The list could not be displayed. The Contacts Folder associated with this address could not be opened; It may have been moved or delected, or you do not have permissions. For information on how to remove this folder from the Outlook Address Book, see Outlook Office Outlook Help. [OK] I would appreciate advice on how to fix. -- Larry Bohen www.audiobooksonline.com Reset the connection between the Outlook Address Book and your Contact Folder. Go to Tools | E-mail account...

error problem
when trying to insert picture I get error Microsoft Publisher has encountered a problem and needs to close. W are sorry for the inconvenience. this happens only if I search fo picture in c: drive, in other drives it's fine, drive error happens a soon as i click "look in" and select c: don't know if this would help but if i click "To see what data erro report contains it shows the following error signature: AppName: mspub.exe AppVer: 10.0.6308.0 ModName: libmplayer.dll ModVer: 0.0.0.0 Offset: 0001100 -- bgjjPosted from - http://www.officehelp.i Thought I'd c...

Logical function for finding different formated cells
Hi, I am interesting in such question: I have table with two types of cell formating, one with font 12 and one with font 10. Is there a function to do something like this: = IF (in target cell font is 12, result A) = IF (in target cell font is 10, result B) Thanks, Svilen Say we want to test the font size in A1. First install this tiny UDF: Function fontsize(r As Range) As Integer fontsize = r.Font.Size End Function then in another cell: =IF(fontsize(A1)=11, "result A","result B") -- Gary''s Student - gsnu2007 "SP" wrote: > Hi, > I am in...

Exchange 2003 Security problems
Hi there, Can anyone please tell me what security permissions the exchange enterprise servers must have to Active Directory AND where I can look to verify that it is there? My 3 exchange servers loose there security rights and must do a domainprep every 8 hours to restore the security. I get the following on the exchange servers: Process STORE.EXE (PID=3456). Exchange Server sample.local does not have Audit Security Privilege on Domain Controller sample.local This Domain Controller will not be used by DSAccess. . PLEASE HELP?? Thanks Hens Hens You need to find out why this is happe...

Count and Sum Function
Hi, Here is a set of data. Can Someone show me how make excell calcualte the differnce between these rows and count at the same time. Coulumn A 58.63 58.27 -0.36 58.66 0.39 59.21 0.55 59.73 0.52 59.57 -0.16 59.43 -0.14 Desired End result: There are 3 values >0 and their sum is 1.46. ( My preference is to do this without using Coumn B) Thx See response in Programming. Regards, Tom Ogilvy "omi" <oshafi92@hotmail.com> wrote in message news:080601c3602e$fd89e260$a001280a@phx.gbl... > Hi, > > Here is ...

Email Problem #5
I have set up outlook to connect to the Yahoo Pop server. I can successfully send emails using Outlook but receive the following error message when soing so: Task 'pop.mail.yahoo.com - Sending' reported error (0x800CCC78) : 'Unable to send the message. Please verify the e-mail address in your account properties. The server responded: 530 authentication required - for help go to http://help.yahoo.comhelp/us/mail/pop/pop--.html' I seem to be unable to receive emails into my Outlook inbox. I have contacted Yahoo and followed all the instructions they gave me. They told ...

Problem with MessageBox and UpdateData
Hello, I develop a small MFC application when I put a button I can open my hard disk and I choose a file. After to have choose, size and name of the file are implemented in two variable of my new class. In fact, to reduce my source file, I add a source fille (.cpp) where I declare my function who open my hard directory, this is my source code : CString choix_film(int m_taille,CString m_essai2,CString m_essai1){ CString OpenFilter; OpenFilter = "All Files (*.*)|*.*||"; CString s; CFileDialog FileOpenDialog(TRUE,NULL,NULL,OFN_FILEMUSTEXIST|OFN_HIDEREADONLY|OFN_PATHMUSTEXIST,OpenF...

OWA2003 server side rule problem
Hi there, Exchange 2003 running on W2K3 server with BE & FE, BE is also runs AD. Now via FE's OWA, I login & create rule there to auto fwd "send only to me" emails to my personal pop3 mailbox. I found that when exchange receive emails, it did auto fwd a copy out, however my personal pop3 mailbox never receive it. From ESM msg tracking, it said at backend server, date/time SMTP Store Driver: Message Submitted from Store date/time SMTP: Message Submitted to Advanced Queuing date/time SMTP: Started Message Submission to Advanced Queue date/time SMTP: Message Submitted ...

Exclusive use Problem
My office is having a problem with multiple individuals in a file at the same time. These files are supposed to be in an exclusive use format where one individual has the file locked for editing. Others are supposed to be only able to view the file in read only format. Sometimes there is a glitch and two people on the network will be allowed to be in the file at the same time, and both will be allowed to make changes within the file. Does anyone know why this occurs? Thanks. ...

Really weird attachment problem.
There is one company that we cannot send attachments to. The message goes through but the attachment is not there. There is no error or indication that there was an attachment. We are using Exchange 2003 with ESafe SMTP gateway for virus protection. I have been able to confirm that it is not the ESafe software causing the problem by bypassing ESafe for sending external e-mails. Whats weird is that if I look in message tracking normaly I will see the e-mail gateway of the recipient listed with the message "Message transferred to mail.whatever-domain.com through SMTP". In the...