Question about OleSetClipboard return CO_E_NOTINITIALIZED error!

When I using Clipboard function, for example below codes,
SetClipboard() always is failed.I track into it and find
OleSetClipboard return CO_E_NOTINITIALIZED. I depend on its tip and add
Coinitialize() in. but It strill is wrong. who can help me?

      COleDataSource* pOds = new COleDataSource();
        if (pOds == NULL)
            return FALSE;
            pOds->CacheGlobalData(nFormat,hMem);
	pOds->SetClipboard();

0
Michael
9/15/2006 10:18:30 AM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
1550 Views

Similar Articles

[PageSpeed] 51

Michael F wrote:
> When I using Clipboard function, for example below codes,
> SetClipboard() always is failed.I track into it and find
> OleSetClipboard return CO_E_NOTINITIALIZED. I depend on its tip and add
> Coinitialize() in. but It strill is wrong. who can help me?
> 
>       COleDataSource* pOds = new COleDataSource();
>         if (pOds == NULL)
>             return FALSE;
>             pOds->CacheGlobalData(nFormat,hMem);
> 	pOds->SetClipboard();
> 

Did you check the return value of CoInitialize?

Stuart
0
DerTopper (96)
9/15/2006 1:20:52 PM
Reply:

Similar Artilces:

Calendar Printing Assistant Error
HI all, When I try to open CPA I get the following error. Cannot connect to Microsoft Office Outlook 2007. Please restart Microsoft Office Outlook 2007 and Calendar Printing Assistant. Original Microsoft Office Outlook 2007 error message: Object reference not set to an instance of an object. Does anyone have any suggestions. Thanks Gladys ...

Error 0x800C0155,2
Everytime I tried to start up Maillive I get the message with fault code 0x800C0155,2 I have surched on the web but didn't get a good solution for this problem. The solutions of shutting down the virusscanner and using the administrator logging doesn't work for me. I have also updated, reinstalled Maillive but no solution. I"m stilll using Windows XP and didn't change the last days anything on my computer. This fault just suddenly occured after a correct use of the Mail program for more then a year. Is there anyone who has useful solutions for this problem???? ...

Return null (blank) instead of zero
I have written an expression using the IIF function. It evaluates two number fields and performs a calculation. I would like to display null (blank) if the expression returns a value of zero. Is this possible? If you want it to display blank then you can use the control's format to set that. Set the format as follows #;-#;"","" If you want it to BE null then you need to do the calculation and test the result and then either return Null or the value of the calculation So if your original IIF is IIF(A<>B,A*B,A) Then it now becomes IIF( IIF(A<&...

Comparing 3 Columns and Returning a Result
Hello. I have 3 columns I want to compare, A, B & C. All the values are text values. What formula would I use if I want to determine the following: If a value in column A is found in column B, then return the value in column C (which corresponds to column B) and place in column D. When I attempted to write the formula using the IF logic, it only worked when the values in columns A & B were on the same row. This, however, is not the case for all rows. There are more unique values found in B then in A. Example A B C ...

how to record the return of principal when a bond matures
I have a bond investment that matured on Jan 1 2008. The principal amount has now been returned to my bank account. How do I record this in my investment transactions? -- Cheers. Christian There is a Return of Capital investment activity... "Christian" <Christian@discussions.microsoft.com> wrote in message news:75CA3A95-DB74-447D-9C66-E618DA9E53C9@microsoft.com... >I have a bond investment that matured on Jan 1 2008. The principal amount >has > now been returned to my bank account. How do I record this in my > investment > transactions? Thanks. I have...

compare columns return first duplicate only
I have 2 worksheets: First worksheet, 1st column has department abbreviations, 2nd columns has the formal department names names Second worksheet, 1st column has abreviations, 2nd column contains department nicknames, 3rd column contains floor space by the floor for each department, 4th column contains the total workspace for each department. (I did a vlookup to sum) On a new worksheet First column compare abreviations from first column in other worksheets and return the nickname (and only first duplicate instances) and in the Second column return the total workspace for the department (incl...

Office errors
Hi: I have Windows2000 Pro with sp2 installed. Also I have Office2000 professional. Recently, my office programms have some problems: 1.Word does not work well but I can open it. 2.Excel doesn't open at all. I've tried to reinstall them, no luck. any suggestions? Thanks a lot! One common solution is to clean up your windows temp folder. For excel: Sometimes, the file that holds the customized toolbar gets corrupted and causes excel heartache when opening. Use Windows start button|Find| and search for *.xlb. You may have to search for hidden files within hidden folders. But...

What is error# 0x80040102, my Domino connector is not reading mail
My calendar & tasks are read by the outlook easily but fails to read mails. It's working for perfect for a collague but fails on me every time. Finally this is the error which is shown by the replicator. ...

Linked Template compatibility error
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel I am receiving this message in the compatibility tool upon open. This is a .DOC file not a .docx <br><br>Word cannot find linked template. <br><br>What can I do? <br><br>I don't really want any template. <br><br>Thanks <br> -Alan All Word documents are based on templates, .doc - .docx makes no difference whatsoever :-) Apparently a template was attached to the document by its creator. The document will continue to look for it every time you open the ...

Rookie question...
How can I add 0's in front of a columb of cells with the format as numbers...? I am trying to add get all the numbers in column A to have 10 digits each. If I enter it manually, I can do it by changing the column format to "text" and then adding the 0's in front manually. However I have over 6 thousand entries here. so I am trying to find an easier way to do this. Any help would be appreshiated. Thanks. Below is an image for a visual. http://www.classiccarsintl.com/temp/image.jpg The cell format is set to "general", but setting it to "text" is the ...

Reports error #7
Setup: Server A is CRM 4.0 Rollup 2 Server B is SQL 2005 w/SP2 and SSRS connector Server A has two orgs installed: Production and Test. Reports work great on Test, no problems at all. However, on Production reports are met with the following error: The permissions granted to user 'domain\server$' are insufficient for performing this operation. I have not found any solutions for CRM servers that are running multiple tenants. I checked the report server settings on the two orgs and they are indentical. I have also checked the DB settings on the SQL server and they are identic...

returning to file previously worked on after closing it.
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel In Appleworks, whenever I returned to the file I had been using (eg the manuscript I had been working on) the last page I had been editing would open up. But in Word, it always opens at the first page of the document and i have to scroll down many pages to reach the page I had been last working on. <br> Is there a short cut? A couple of the simplest & most direct solutions: Once the file opens key Command+End. If using a laptop or compact keyboard you may need to use the fn key along with that. ...

Populate field based on data returned from Control query
Need some assistance on this one - I have a form that requires either a manually entered ID number or to generate one sequentially. I already have the SQL written to manually increment the ID numbers, but am drawing a blank as to how to get the control to populate the field. For example, a person needs to be entered into the system and they have an existing university-issued ID number. The form allows manual entry of any ID. The functionality required is for the user to click a control (button) that grabs the next available ID from a table (it's actually a single row/column table that the...

Legal Question
Since I do not want to spend 24 hours a day in my store, can I install a copy of RMS on my home computer and take the dongle (along with a backup copy) with me to do updates to the system? Does anything change with regards to hardware as I would not have the receipts printer or associated hardware? Just want to get the items database finished and complete it in the comforts of my home. Bill, If you want to work on the database locally on your home computer then you do not have to take the dongle home with you. Install the RMS Software on your home computer and make a backup of your d...

Runtime error
I am using a module called TimeToDec to convert a time like: 10:00 Pm to 10 for the purpose of multiplying it with another value to get a dollar amount for hours worked*pay rate=amount owed. This is taking place in a form and as I step through the EmployeeID field, I am getting a: Microsoft Visual Basic RunTime error '94': Invalid use of null. My options are to debug or end. Does anyone know how to fix this? Thanks Check the underlying data at table level. You probably have null values in the field that TimeToDec uses in some records. TimeToDec probably doesn't know ...

general questions.. please help
can i know normally do people convert text files to xml format? how can we do to convert data from text files to xml? is it possible? to generate xml from jsp is it done automatically or manually? thanks in advance! appreciate if there are any links helpful... thanks all of u! jeremy *-----------------------* Posted at: www.GroupSrv.com *-----------------------* Hello Jeremy, > can i know normally do people convert text files to xml format? not normally by hand, but it can be done. Doing it with a program is better. > how can we do to convert data from text files to x...

error code #2
I'm having a hard time sending & receiving. the "Outlook Send/Receive Progress" window pops up it says "0 of 2 Tasks have completed successfully" Sending and Receiving' reported error (0x8004210A) : 'The operation timed out waiting for a response from the receiving (POP) server. If you continue to receive this message, contact your server administrator or Internet service provider (ISP).' Sending and Receiving' reported error (0x8004210B) : 'The operation timed out waiting for a response from the sending (SMTP) server. If you continue to ...

Deleting rows when cell has "#DIV/0!" error
Hi, I'm currently using this code to delete rows with balnk cells. However, i have changes the formatting of my sheet and the cells are no longer blank they have the "#DIV/0!" error. How can I delete the entire row when the cell in column D has that value? Sub DeleteRowsIfDIsBlank() With payrollsht Dim rg As Range, rgBlank As Range Set rg = Cells.Range("D:D") On Error Resume Next Set rgBlank = rg.SpecialCells(xlCellTypeBlanks) On Error GoTo 0 If rgBlank Is Nothing Then Else rgBlank...

Quick question on sorting folders in Outlook
I am using Outlook 2003. Can I sort the order of my folder list? Not the contents (emails), but the folders themselves. It appears to be sorting alphabetically and no way of reorganizing them. Thanks! Keith You cannot change the order of the system folders--Inbox, Sent, Deleted etc, but you can name your personal folders accordingly. I have a folder I want at the bottom called XSaved, for instance. And you can put subfolders in the system folders. "Keith" wrote: > I am using Outlook 2003. Can I sort the order of my folder list? Not the > contents (emails), but...

licensing question #2
in crm 4.0 enterprise edition, we can install other services/roles in separate servers for scalability. how does licensing works on this scenario? another question, if i have multiple web server that hosts CRM, does it requires separate license? ...

Formatting Cells Question
Hi I am having troubles with formatting cells in EXCEL 2003. I have a column of many hundreds of rows lthat contain data like this: 01Jan12 on fist glance this looks like a date but it really is not. EXCEL on the other automatically assumes it is a date and formats as such. 2001-Jan-12 I have tried formatting as text, General and even experimented with custom formats to no avail. In the same column I have 03Mar1543 Which is dispolayed exactly as is. How can I get EXCEL to simply display data like 01Jan12 exactly as is? You must format the cell as Text BEFORE typing any information...

Return all entries eventhough they're not matched
-- Allen Phailat Wongakanit The big white space is generally considered the place to describe your problem or question. Try changing your join to left or right which ever makes sense in your context. "ali" <ali@discussions.microsoft.com> wrote in message news:052C53BA-7E12-49A3-A62D-915C4A964084@microsoft.com... > > -- > Allen Phailat Wongakanit ...

Error Msg
Hi When I drop the table through query or enterprise manager in sql server 2000 it gives the following error “Server: Msg 7105, Level 22, State 3, Line 1 Page (1:1424), slot 0 for text, ntext, or image node does not exist. Connection Broken” There is no column with the data type text, ntext or image is in table and no foreign key only a composite primary key is on the table. But data in the table can be modified, deleted or modified. Dbcc checkdb also raises error “Server: Msg 8929, Level 16, State 1, Line 1 Object ID 2: Errors found in text ID 2655486279680 owned by dat...

Another dumb question
I'm formatting a document (a new copy of an older document that I wrote, I think) in Word 2000. Now in Word 2007, I cannot seem to find any heading levels except for Heading 1. What do I have to do to get the predefined heading levels back? You should be seeing at least Heading 2 in the Quick Styles gallery. The way the headings are set up in Word 2007, only one level below the one in use is shown in the Styles task pane, so if you have a Heading 1, you should see Heading 2. If you apply Heading 2, then Heading 3 should appear. If this is not the case, you should be able to ...

http error 501
Hy everybody, I would like to ask if someone has any clue about my problem. When I'm triing to create new public folder I'll ger the error mentioned in subject. This problem is discused in Article ID 839744, but it doesn't help:-( If someone knows something please share your knowledge. Thank You very much. ...