Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Code stops working after installing SP2 on WinXP

Posted on 2004-10-20
8
329 Views
Last Modified: 2008-02-01
I posted this question in the C++ section under "Programming" a couple of days ago, but haven't got a solution yet.  I guess I should try posting it in this section.

I have a client-server application.  The server is running in a WinXP Pro. machine, and the client is running in a Win2K machine.  Brefore SP2 was installed, everything was working fine.  However, after the install of SP2, I got a "RPC server is unavailable" error on the client.  I put the "RestrictRemoteClients" setting (DWORD) with value of 0 under \\HKLM\SOFTWARE\Policies\Microsoft\Windows NT\RPC\ on the server machine.  It didn't help at all.

Basically, the client program needs to create a COM object on the server by doing the following:

CComPtr<IPrintJob> spPrintJob;
HRESULT hr = CoCreateInstance2( _T("Server"), CLSID_PRINTJOB, &spPrintJob, true );

The returned hr value is 0x800706BA.  The CoCreateInstance2 function is below:

template <class Q>
static HRESULT CoCreateInstance2( LPTSTR lpszHost,
const CLSID& clsid, Q** ppq, bool bUnAuthenticated = false, DWORD dwClsCtx = CLSCTX_SERVER )
{
     (*ppq) = 0;
   
     if (lpszHost)
     {
          USES_CONVERSION;

          COAUTHINFO cai = { RPC_C_AUTHN_NONE, 0, 0, RPC_C_AUTHN_LEVEL_NONE, RPC_C_IMP_LEVEL_IMPERSONATE, 0, 0 };
          COSERVERINFO csi = { 0, T2W(lpszHost), 0, 0 };

          if ( bUnAuthenticated )
          {
                  csi.pAuthInfo = &cai;
          }

          MULTI_QI mqi = { &(__uuidof(Q)), 0, 0 };
           
          HRESULT hr = ::CoCreateInstanceEx( clsid, 0, dwClsCtx, &csi, 1, &mqi );

          if (FAILED(hr)) return hr;
           
          (*ppq) = (Q*)(mqi.pItf);
          return S_OK;
     }

     return ::CoCreateInstance( clsid, 0, dwClsCtx, __uuidof(Q), (void**)(ppq) );
}


Please advise.  Thanks.
0
Comment
Question by:cmsdiginet
  • 4
  • 2
8 Comments
 
LVL 2

Expert Comment

by:tomasg18
ID: 12367312
Have you tried disabling the firewall on the Windows XP SP2 machine?  If the application works with the firewall disabled, then you need to open ports for your application to work.  
0
 

Author Comment

by:cmsdiginet
ID: 12371101
I turned off the firewall on XP machine.  That didn't help at all.
0
 
LVL 27

Accepted Solution

by:
Asta Cu earned 500 total points
ID: 12373631
Microsoft has offered FREE support for Windows XP SP2; here's some info on that, used it and very much helped some problems that couldn't be resolved directly.  

Hopefully Experts here can help you, but it may be worth some time to check out your FREE options here in the event it is an issue that requires escalation to Microsoft for a solution that doesn't yet exist.  I'm not sure how long this will be free, and have used the Tech Chat interface and been happy.  But as always, your call.

http://support.microsoft.com/oas/default.aspx?LN=en-us&gprid=6794&x=16&y=11

Asta
0
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 

Author Comment

by:cmsdiginet
ID: 12438846
I sent an email to Microsoft Support yesterday, but hasn't got any reply yet.
0
 
LVL 27

Expert Comment

by:Asta Cu
ID: 12438888
I use the TECH CHAT option instead because it is immediate.
0
 
LVL 27

Expert Comment

by:Asta Cu
ID: 12735850
Thank you, I am happy I could be of some help to you here; although a "C" grade typically means you didn't get what you hoped to achieve, in my humble opinion.  Sorry for the delay in responding, have been ill....  Best wishes, ":0) Asta
0
 
LVL 27

Expert Comment

by:Asta Cu
ID: 12763752
Thank you for the Feedback on this issue; I do appreciate it and commented there as well.   Personally speaking, the fact that Microsoft still offers free support for the Windows XP SP2 update, is a win-win scenario from a couple of perspectives.  First, in my humble opinion, the developers for Windows benefit by hearing from the end-users on problems found and roadblocks to the new releases so they can address the issues and rollout fixes in future releases and secondly, we all benefit anytime we can interact with developers to share our problems and workarounds and also get the added benefits on future releases which incorporate these fixes.  Best wishes, ":0) Asta
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you unable to synchronize your OST (Offline Storage Table) file with Microsoft Exchange Server? Is your OST file exceeding 2 GB size limit? In Microsoft Outlook 2002 and earlier versions, there is a 2 GB size limit for the OST file. If the file …
cPanel is a Unix based web hosting control panel that provides a graphical interface and automation tools designed to simplify the process of hosting a web site. cPanel utilizes a 3 tier structure that provides functionality for administrators, rese…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question