custom errors in HRESULT

We have methods that all return HRESULT. We want to also report our custom 
error values in HRESULT. What's the right way to do this? 
0
Sasha1 (27)
6/24/2005 3:13:04 PM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
755 Views

Similar Articles

[PageSpeed] 40

"Sasha" <Sasha@discussions.microsoft.com> wrote in message
news:87F67172-76EA-4B3D-9FEE-EBFC687F83D0@microsoft.com...
> We have methods that all return HRESULT. We want to also report our custom
> error values in HRESULT. What's the right way to do this?




See "Error Handling (COM)" at
http://msdn.microsoft.com/library/en-us/com/html/15f3ae3e-1794-4948-a7aa-6309a703364b.asp

In particular, read the section on "Using Macros for Error Handling"

Mike


0
6/24/2005 4:08:38 PM
>We have methods that all return HRESULT. We want to also report our custom 
>error values in HRESULT. What's the right way to do this? 

Have a look at the MAKE_HRESULT macro and the topic in MSDN titled
"Structure of COM Error Codes".

Dave
0
davidl7375 (2060)
6/24/2005 4:14:32 PM
Reply:

Similar Artilces:

can this be done? (Manager customizations)
Can buttons be added to the Store Operations Manager screens? I would like to add a button to the screen where new customers are created. This will open another screen where additional information for the customer can be entered. (I am trying to add fields; I know there are certain "additional fields" but I don't want to use those. So, I am not sure if 1. A button can be added. 2. Can the form be opened and additional information be tied to the customer. 3. Only open this from the Manager screen. (not on a Customer Save event in the Store Operations screen.) Even if a b...

Protocol Error
Hello ! I receive this error : A mail message was not sent due to a protocol error. 556 sorry, your reverse is in my badreversefrom (#5.7.1) The message that caused this notification was: To: <terrana@paini.fr> From: <fabio.guidetti@paini.com> Subject: test1 Someone may explain me the meaning of this error ?? Thanks in advance. Bye "Fabio Guidetti" <anonymous@discussions.microsoft.com> wrote: >I receive this error : >A mail message was not sent due to a protocol error. > 556 sorry, your reverse is in my badreversefrom (#5....

Messaging Subsystem Spooler Error message
My Outlook mail is forzen. i cannot send or receive messages. The error message reads: Messaging Subsystem Spooler. Any suggestions on how to fix this problem? I'll throw my hat into this ring as well. Outlook has been working fine for months/years. And then for no apparant reason (don't know what the wife did in my absence) it stops functioning with the message "Microsoft Windows (TM) messaging subsystem spooler has encountered a problem and needs to close" I'm running Outlook 2000 with Windows XP. Funny thing is that Outlook Express continues to work fine ...

Disable POP3 Password Error Pop-Up
I use Outlook with my POP2 email servers and have it check for new messages every 1 minute. Problem is, when the ISP has a server issue, Outlook pops up the email account password box which takes the focus. If my users are heads down typing, they mess up the password settings. Is there any way to disable the pop up? Thanks! Novice Techie <test@domain.com> wrote: > I use Outlook with my POP2 email servers and have it check for new > messages every 1 minute. POP accounts in Outlook employ POP3 protocols and one minute is way too short. The recommended minimum for the send/...

excel 2007 error bars, why so complicated...
Hi, How can the task of adding 'error bars' to a graph be simplified with excel 2007. In excel 2003 it is done way easier, almost just by double clicking the graph. In the 2007 version you have to walk through menus and then more menus to get the task done. When one has to do this for 40 graphs then the 2007 way quickly becomes a huge hassle. Any way to make excel 2007 as easy to use as excel 2003 for this particular feature ? (maybe with a macro or some other way to get this added to the 'right' click menu somehow) Thanks, Michael Michael - This is one of the proble...

Outlook.exe keps closing (error)
I have one unit onsite where Outlook.exe (Outlook XP Sp3) keeps creating a general error and shuts down. the user may not even be working with Outlook when it pops the message it must close. I've exausted all of my items as a fix and really don't want to perform a rebuild unless absolutly neccessay(considering this application is the only issue) I've performed an un-install(restart), re-install, adware scans..... Any info would be appreciated, Here is the error info in 3 parts: Event Type: Error Event Source: Microsoft Office 10 Event Category: None Event ID: 1000 Date: 09/0...

MAPI or an inspecified service provider error
I have a cluster running Exchange 2003 SP1. I also have a front end server running Exchange 2003 SP1. When I run Exchange System Manager from my workstation running XP SP2 everything works except I can not access the mailbox store information or the public folder information on the cluster. When I try to show the mailboxes I receive the following error: MAPI or an inspecified server provider. ID no: 000004bd-0000-00000000 ID no: c10504bd Exchange System Manager It works find going to the front end server or another Exchange server but will not allow me to access the cluster. If I run i...

User Defined/Custom Input
I have just finished creating a sales cost sheet for flooring installation projects. The sheet consists of a number of drop down lists which allows the sales manager to specify the details of the job ie. There are dropdowns for different types of installation methods, underpad, transitions, stairs, etc.... sales mgr selects the appropriate description in each cell (column A) & the appropriate price shows up in the 'unit price' column. I would like to incorporate another features into the sheet but I'm not sure how to do it. If I use underpad as an example... we sell...

Error When Promoting Emails
Any ideas what can cause this error: An error occurred promoting this item to Microsoft CRM. The Microsoft CRM server could not be contacted or the user has insufficient permissions to perform this action. Do you want to send the email? If you click yes, the email will be sent out, but no corresponding activity will be created in Microsoft CRM Users have appropriate permissions. I have this same exact error, it's driving me nuts. I've uninstalled & reinstalled V3CRM, and applied Rollup 2. Anyone exncountered this/have anything I can try?? Thanks!! -B "rifleman98atm&...

Linking error #3
Hi all , I am using the fillowing function to build the glut.dll .. int gettimeofday(struct timeval* tp, void* tzp) { struct timeb tb; ftime(&tb); tp->tv_sec = tb.time; tp->tv_usec = tb.millitm * 1000; /* 0 indicates that the call succeeded. */ return 0; } when i build the workspace i get the fillowing error >win32_util.obj : error LNK2019: unresolved external symbol __imp___ftime64@4 referenced in function _ftime@4 1>Debug/GLUT32.DLL : fatal error LNK1120: 1 unresolved externals Can you please help me to remove the errors. regards, Meenal have u included ti...

Error 401 Access Denied
I had CRM installed and working ok in our lab a few weeks ago. Set it aside for final approvals before rolling it out. Went back to verify functionality prior to rollout today and noticied that the emails are not being sent out (they did work a few weeks ago)... Error in Event Log is: Error: <description>An unexpected error occurred.</description><details>An error occurred attempting to dispatch the email : HTTP status: 401 Access Denied.</details><file>D:\CRM\Core\src\platform\include\proxy\proxyutil.h</file><line>47</line> All emails fa...

Error while editing record in bound form
Dear all, Sometimes I get the following error message while editing record in bound form with backend Ms SQL (ODBC) : The data has been changed. Another user edited this record and saved the changes before you attempted to save your changes. Re-edit the record Please help. Thanks. Vensia you should be using Access Data Projects, it is no longer reccomended to use linked MDB files FILE, NEW, PROJECT (EXISTING DATA) "Vensia" <vensia2000_nospam@yahoo.com> wrote in message news:ebWDw5VjHHA.2120@TK2MSFTNGP03.phx.gbl... > Dear all, > > Sometimes I get the followin...

OWA Junk Mail Error
I am receiving the following error for one user when they log into OWA on Exchange 2003: An error occurred processing your Junk E-mail lists. You are over the size limit allowed on the server. This also grays out most message buttons on the OWA toolbar until she leaves that folder and comes back. She has no junk email filters set anywhere. ...

Visual C++ error when starting Outlook XP
Whenever I start Outlook XP I get the following error: Debug Error! Program: c:\progra~1\Micros~2\Office10\outlook.exe abnormal program termination (press retry todebug the application) Abort Retry Ignore Whn I abort, it quits Outlook and I go back in just fine the second time. Anyone have any ideas? ...

Crystal Reports Error 08-18-03
We have moved CRM from one server to another server. Everything has gone well except now when we try to open any report we get the following message: File Repository Server Input is down. [On Cache/Page Server: CRMSERVER.pageserver] Under the Crystal Configuration Manager I can see it has entries now for both the old server and the new one. Can anyone help? Andrew Reeves ...

advanced find for parent customer
I am trying to structure the following as a query in advanced find. A contact may introduce clients to the company. If they do, then the client they introduce has the introducer as it’s parent customer. I want to create a list of contacts who have introduced others who have open opportunities Eg X introduces Y For contact Y, parent customer = X Contact Y also has an open opportunity The query should return X -- Lorraine Quigley ------=_NextPart_0001_66726B61 Content-Type: text/plain Content-Transfer-Encoding: 7bit <LorraineQuigley@discussions.microsoft.com> wrote: > I am try...

Can I create a custom MIME player within Outlook and Outlook Express?
I have a special SMTP e-mail from a custom server that is encoded as text/myapp-xml. I would like to create a control to format it within Outlook and Outlook express instead of displaying raw XML. I used the MSDN mime player example and can view the text/myapp-xml content in a web page within IE fine, but within Outlook and OE, it is just text. Is there some special registration I need to do to get the OCX mime player to work in O/OE? Below is what the e-mail looks like. Any tips/help are appreciated. jmw ------------------------------- Return-Path: From: To: Subject: Mime-Version: 1.0 ...

Customer Purchase Order Numbers on Invoices?
Our commercial customers require their purchase order number to appear on the invoices we generate. I do not see an area where this can be entered. I have the same problem and while it isn't perfect, I use the F9 method. By pressing F9 while ringing up the sale, you can enter a Reference # and a comment for the transaction which will print on the invoice. Here is the problem... there is no way to make PO# entry mandatory for specific customers so your employees must remember which customers to ask a PO# for, and this has been no end of problems for me. Also, this information is...

Excel getting Error
My excel file was working fine until yesterday.suddenly when i try to open the file it giving the error message "file format is not valid " But i can open the file in Ms WORD. AND I CAN SEE THE DATA. SO WHAT I DID I COPIED ALL THE DATA AND PASTED IN NEW EXCEL SHEET. I CAN GET THE DATA BUT NOT THE FORUMLA..?? I HAVE LOT OF FORMULA IN EXCEL SHEET.. CAN ANYONE HELP ME HOW TO RECOVER IT? HOW TO OPEN THE EXCEL WHICH IS GIVING THE ABOVE ERROR. MSWord allows you to open .xls files. The bad news is that if you save that file in MSWord (as an MSWord document with .xls as the extensi...

Error generating xml document during serialization: Project speci
I'm getting the above error in 1 solution/project for the following code but the exact same code works fine in other projects. References are the same. I also get xml serialization error from a web services in this solution, but the exact same calls and code work in other soutions. I compared the underlying sln, proj, etc, files, and they appeared to match among working and this non working solution. Anybody have any ideas? Dim serializer As New System.Xml.Serialization.XmlSerializer(GetType(Licensing.License)) Dim oMemStream As New IO.MemoryStream Dim oLicense As ...

mail merge error "System Aborted"
Hi, when I create a campaign activity which is of type mail-merge and choose to merge to word, the system doesn't work. a) Unsuscribe part of email doesn't appear b) It doesn't post CRM:xxxxx token c) The email was sent through Word, but did not track in CRM. d) the campaign activity has the state 'aborted by system' Is this a bug? Any ideas Thanks in advance Cristiano Is there a file attachement, or after these are sent do there appear to be file attachments on the e-mail??? If the size of any attachment (i've seen this) is greater that 5MB it errors sim...

ISV Customizations -- Add Item to Navigation Pane in Sales Area
Is there a way for me to use the ISV.Config.XML file (or by other means) to create a new item in the left Navigation Pane of the Sales Area? Or possibly create a New area with its own custom Navigation Pane items? The new Navigation Pane item would load an externally hosted web page right into the Microsoft CRM environment. Is that possible? Thanks so much for your consideration, Robyn You should use the sitemap for this. 1. Export the sitemap, by using the Export Customization option. 2. Modify the sitemap 3. Import the modified sitemap. Check the SDK for more details... > Is th...

Delete custom form is grayed out
I tried making a custom form to send emails. When it didn't work right, I tried to use Tools|forms||choose a form or design a form to delete the form, but the buttons for delete and properties were grayed out. The form is saved in Personal Forms Library as "Message" same as std form; not sure this is why I can't delete it. I have a backup program which saves the pst file everyday, and the special form adds 30k to the file size every day; so I want to delete this trash. Any idea how to get to the form to delete it? the only think I see that accesses that folder is ...

Error Message #5
The following error message is received when attempting to access Outlook XP Standard after authenticating through vpn. "Your logon information was incorrect. Check your username and domain, then type your password again. If your account is new or if your administrator requested change you need to click Change Password then logon with your new password." Please note that I'm able to access OWA with the same user name and password with no problem this only happens when attempting to open Outlook XP Standard after authenticating through vpn. I've also checked the ...

Restricting Customer Lookup to Accounts (in 4.0)
This handy (unsupported) opportunity form onLoad event script worked in CRM 3.0 but seems to be useless in 4.0 //Allow only accounts to be selected crmForm.all.customerid.setAttribute("lookuptypes", "1"); Any ideas? ...