ERROR_NO_TOKEN-CreateDispatch fails

Hello,

I'm want to use DIAdem 9.x( It's an application) Automation Object in 
VC++.but my CreateDispatch returns the Win32 error code (GetLastError) - 1008

Error Details:
**************
GetLastError returns:    1008
Win32 Error Code    : ERROR_NO_TOKEN
Description:		An attempt was made to reference a token that does not exist. 
What does that mean "An attempt was made to reference a token that does not 
exist. " ? How can i get this executed ?

But  the Automation Object created for "DIAdem.toCommand" succeds in 
VBScript ?

Please find the code snippet below.

code snippet:
**************
This is a Win32 COM DLL.
I'm calling the CreateDispatch function in the worker thread,


DWORD  dwThreadId;
	if((m_hinstance = CreateThread(
		 0,
		 0,
		 appthread,
		 (LPVOID)this,
		 0,
		 &dwThreadId)) == NULL)
	{
		return S_FALSE;
	}


DWORD WINAPI appthread(LPVOID lpParam)	
{
	COleException *err = new COleException;
 	_ApplicationApp app; 
	if( app.CreateDispatch("DIAdem.tocommand", err) == FALSE)
	{

		// here it fails.
		CString f;
		f.Format("%u,GetLastError() ");
		AfxMessageBox(f);
	}
			
			
	
return 0
}

Thanks,
Sudakar




0
Sudhakar (6)
9/9/2008 5:48:01 AM
vc.mfc 33608 articles. 0 followers. Follow

0 Replies
747 Views

Similar Articles

[PageSpeed] 33

Reply:

Similar Artilces:

554 Relay Operation Failed
Dear All, Can anybody help in fixing this prob in microst outlook.the error message is 554 relay opeartion failed. regards, altaf You cannot use a mail server other than the one on which you are logged on for sending mail. Set your authentication on the Server tab of your account properties to use authentication, or contact your ISP and ask them. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. After searching google.groups.com and finding no answer altaf <altaf@mafoi.com> asked: | Dear All, | | Can anybody help in fixing this pr...

RPC over HTTP Fails Frequently
We have just recently installed a new server with Windows Server 2003 Standard, Microsoft Exchange 2003 Enterprise and Share Point 2003. I installed and configured http over rpc. It worked for the first day and then quit. I restarted the Exchange MTA service and it started working again for an hour and then quit again, this time restarting the MTA service didn't help. I installed exchange service pack one and required hot fixes hopeing it would make the RPC over http proxy more stable. But it still did not work. I removed and re-added the RPC over HTTP service in add remove programs amd...

MS Outlook Fails after AT&T Connection
This is a multi-part message in MIME format. ------=_NextPart_000_0006_01CA1388.B3E7E6C0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Experts, I use AT&T Global client for connecting to VPN. But the Microsoft = Outlook is not working for the VPN. Please let me know if there is any = proxy settings to be configured after connecting through AT&T Global = Client. Thanks in advance, Sivaswami ------=_NextPart_000_0006_01CA1388.B3E7E6C0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-pri...

Public Folder Rehome and Replica Deletion Failed
Hi, Trying to rehome and remove the source Exchange 5.5 server from the replica list as part of the cross-site migration (5.5 to E2K3) but failed. The public folder has replicas on the Exchange 5.5 and Exchange 2003 servers. I had successfully migrated all mailboxes, DLs and Custom Recipients using the E2K3 Move Mailbox Wizard and Object Rehome Tool. The account used had domain admin right, Exchange Full Admin right on the Exchange 2003, and Service Account Admin right on the Exchange 5.5. Below is the log from the pfMigrate tool that I used. --------------------------------------...

Trust relationship between primary and trusted domain failed
Hi, Recently we lost a remote site that was setup as Windows nt 4.0 domain with bi-dir trust relationship to the main site and bunch others. When the only PDC failed in this site, we built a new server with windows 2003 and made it join AD domain. Everything is working fine now as far as cross domain authentication, printing etc. However when I try to change the windows account for their mailbox, I get following error. The trust relationship between the primary and trusted domain failed. Microsoft Windows NT ID No: 0xc00206fc I checked the trust and it's already set to bi-directional. ...

EnableDocking(CBRS_ALIGN_RIGHT) failed
Hi all, if I change CBRS_ALIGN_ANY to CBRS_ALIGN_RIGHT, the code will break at statement DockControlBar(&m_wndToolBar); why? thanks int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CFrameWnd::OnCreate(lpCreateStruct) == -1) return -1; EnableDocking(CBRS_ALIGN_RIGHT); if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) || !m_wndToolBar.LoadToolBar(IDR_MAINFRAME)) { TRACE0("Failed to create toolbar\n"); return -1; // fail to create } if (!m_wndSta...

Money 2003 and Mobile PC 2003 failed install
I have been using Money Deluxe 2003 for a year. I just upgraded my IPAQ 3955 Pocket PC 2002 to 2003. I installed the Pocket PC Money 2003 and it stated that it can only install on Pocket PC 2002, and quit. I tried the Pocket PC Money 2004 but it would not sync, just act as a standalone. Help Thanks, RA have a look at http://www.ppczone.net/forum/showthread/t-5064.html had to play about a bit though. I copied the file from My Device /Windows /AppMgr /Install and renamed it to something else. When i clicked on the original file to install it gave me the error message. With this stil...

Project Failing in the Reporting(Project Publish) Step
We are running MS Project Server 2007 SP2 with AUG09 MS CU. One of our projects is always failing on the "Reporting(Project Publish) step with the following error. I am not an SQL Error summary/areas: Reporting message processor failed ReportingProjectChangeMessageFailed ReportingProjectChangeMessageFailed ReportingProjectChangeMessageFailed ReportingProjectChangeMessageFailed ReportingProjectChangeMessageFailed ReportingProjectChangeMessageFailed Queue GeneralQueueJobFailed Error details: <?xml version="1.0" encoding="utf-16"?> <erri...

MSDE Install Fails
I start the install process and it fails at the installing MSDE. I've tried installing SP4 MSDE separately and it fails still as well. The system reports "Fatal error during installation.". When I install manually I get "A strong SA password is required for security reasons. Please use SAPWD switch to supply the same. Refer to readme for more details. Setup will now exit." Below is the log file of the manual install as I could set a trace on it. Anyone ever experience this and have a solution? John === Logging started: 9/27/2006 13:44:39 === Action 13:44:39: INSTA...

Delivery failed
I have created a contact on Ex2k3 with external address (hotmail account) and an alias (sales@abland.com). When I send email to the alias and then check it on the hotmail account to see if it was delivered, it does acknowledge that a mail was sent but gives a "delivery failure " notification. What am I doing wrong? By the way can anybody tell me where is the tab Delivery Option in Ex2k3? Would appreciate any help on these. - Delivery Options is in recipient (user, group, contact, etc.) properties | Exchange General tab. - What does the "delivery failure" notification say...

Login credentials failed on a back up of MS Money
I have an older backup that I have to access to capture Business records from 2004 & 2005 for a Home based business. I don't recall the exact events but I started using a new passport account when an old one failed to work upon a version of MS (Home & Business Version) in 2006. I have multiple backups on storage disks and until now have not had to access them. I am in the middle of a tax audit and am trying to prepare, so I need to access older records. When I attempt to access these older files I am unable to because the passport will not accept the password that was as...

Fails to connect to server <OWA-servername>
Exchange 5.5 environment with OWA. Recently we have received lot of calls relating to "Fails to connect to server <OWA-servername>" . Called Microsoft PSS and removed Outlook 2000 from the Exchange server to eliminate conflicting cdo.dll . Also re-applied SP4 and the following hotfixes 818709,836862,842436a. The frequency of "Fails to connect to server" seem to have decreased however still do happen. Help! Do you have another server you can point the OWA server at? regedt32 on the OWA server: \HKLM\System\CurrentControlSet\Services\MSExchangeWeb\Parameters\S...

Exchange 2003 /w W2k3, Outlook fails to reconnect randomly
Hi, Outlook 2003 fails to reconnect randomly to Exchange 2003 Enterprise Server, OWA works well. After authenthication failure Outlook falls to offline and further attempts to Send and Receive on Outlook produce error 0x8004011D. Does anyone have similar problems? -- htp ...

Method OnAction failed
I developed an add-in in Office XP. I am assigning procedure names on my toolbar buttons and I am creating temporarily on menu bar a new item for my program. As soon as client tries to select any button from my toolbar or any item from the menu bar, error appears "Method OnAction of object '_CommandBarButton' failed". Is there any solution for this ? This is the code I am using: Dim cbr_menu As CommandBar Dim cbr_control As CommandBarControl Dim cbr_button As CommandBarButton '-------------------------------------- Excel MENU ----------------------------- Set cbr_...

Uprade failed "database is not published for merge replication"?
17:29:22| Info| metabase: Provider=SQLOLEDB;Data Source=MPILL1;Initial Catalog=MindPillar_LLC_METABASE;Integrated Security=SSPI 17:29:22| Info| Executing Install action: Microsoft.Crm.Setup.Server.ExportXmlAction 17:29:24| Info| Executing Install action: Microsoft.Crm.Setup.Server.InstallDatabaseAction 17:29:26| Info| Dropping Microsoft CRM 1.0 reports database 17:29:26| Info| Dropping merge publication in METABASE 17:29:27| Error| Install exception.System.Exception: Action Microsoft.Crm.Setup.Server.InstallDatabaseAction failed. ---> System.Data.SqlClient.SqlException: The ...

SQL 2008 maintenance jobs randomly failing
Hello all, this is a repeat post. I originally posted about this on 11/10/2009 and though I was a hoping for the advertised 2 day MSDN response it's been almost 2 months, in fact it's even a new year (Happy new year!). If I'm posting in the wrong place or manner please let me know. Here it goes again.... I’m hoping someone here can shed some light on an issue I’m experiencing with SQL 2008. The short version of it is that my maintenance plans are intermittently failing. When I examine the SQL agent logs, the failing entries all contain the line: “Description: T...

The Operation Failed...
I have an Office 2003 SP3 installation on a Terminal Server of mine and when a user double-clicks an attachment it opens. When they double-click the same attachment a 2nd (and any subsequent times) it gives an error message "The Operation Failed." That's it... nothing else. To be able to open this attachment all one needs to do is restart Outlook. But if you try to open it more than once the same error is displayed. I have disabled AV, re-created the profile and ran Detect & Repair. None of these have helped. I have also ran Filemon/Regmon and neither gives a clu...

fail to do Backup
hi, I have my exchange server not completing the NTbackup. I am suspecting two resons causing that problem: 1- hardware failure with one hardisk out of 4 hardisks (RAID5). 2- an incedent occured to one user that he cannot recieve e-mails due to corruption in the mailbox.. in that case I have exported all the existing e-mails, deleted the mailbox and then created it again. I am recieving errors 747 and 217, and the backup is not working what to do in this case. please help -- Zuhair Attya IT Administrator Bahrain On Wed, 28 Dec 2005 01:55:02 -0800, Zuhair Attya <ZuhairAttya@discussion...

Upgrade to 12.0.1 fails even though software is on the volume
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: intel You cannot install Microsoft Office 2008 for Mac 12.0.1 Update on this volume. A version of the software required to install this update was not found on this volume. Count me in on this error. When I go thru AutoUpdate there is no update found. When I download the 12.0.1 updater from Mactopia I can run it, but when I get to the destination screen, my drive has a stop sign under it and the message "You cannot install Microsoft Office 2008 for Mac 12.0.1 Update on this volume. A version of the software required to i...

Outlook 2003 fails to open
The following message is what we get when we try to open Outlook 2003 on a network served by SBS 2003. "Unable to open the Outlook window. The set of folders could not be opened." There and were no 'sysc' type devices connected to any of the computers at any time. The tech staff at the Direct Access newsgroup are slow to respond to this question. Have not found any help in the "Knowledge Base" Rick Are you using Exchange for your mail? Have you tried a new profile? Are the mailboxes already created? --� Milly Staples [MVP - Outlook] Post all replies t...

Powershell fails on Exchange 2007 RTM installation
Hi. I'm experiencing problems with the Exchange Mangement Console and the Exchange Management Shell on my Exchange 2007 test box. It seems that every cmdlet that accesses the AD fails with the same error. Both the Shell and the Console fail with the same errors (I'm thinking that Exchange Management Console internally uses cmdlets). Error message: <cmdlet-command-here> : Active Directory server xxx.mydomain.com is not available. Error message: A local error occurred. There's nothing in the event log, and I know that the AD is running fine, since the installation works perf...

MFC MDI App File>New... fails in South Africa alone
I have a user in South Africa who has a peculiar problem in trying to run our program which is an MFC MDI app. His system is Win98. When he does menu item File>New..., the system reports "Failed to create empty document". This message occurs in the CMultiDocTemplate::OpenDocumentFile(...) function in the MFC source file docmulti.cpp. There is a TRY...CATCH_ALL sequence in CRuntimeClass::CreateObject(...) within objcore.cpp which is presumably getting the control back to the "Failed to create..." message. The user is using a release version of the program and he has no...

Money 2007 fails to open file after reinstall
After doing a fresh install of Win 7 Ultimate and then reinstalling Money 2007, I get the following error when trying to open my current mny file: "Money can't open this file. The file was saved with a later version of Money than you're currently using, or with a version of Money that had online program updates installed. You are currently using Money version (16.0.125.1303). To open this file, you need to install the version of Money you were using when the file was last saved. If it still won't open, click More Info." How can I fix this? Thanks! In microsoft.p...

Open operation on table PT_Palette_temp failed
I added a new user today, then copied the security setup from another ID using Advanced Security. When the user logs in, as soon as she enters her login information & clicks on 'OK', the above message is displayed. When she clicks past it, it comes up again. After clicking on it the second time, it goes away and everything seems to be OK. She gets the message each time she logs in. I (and other users) can log on to her same PC with no problems (using our own IDs). Anyone know what would cause that message? -- Bud Cool Microsoft Certified Business Management Solutions Spec...

"registration failed" on SBS CRM mobile install
Hi all, CRM flying along without an issue. I will quickly reel through the things we have done so far: CRM mobile has installed correctly. Certificates created using the online MS CA on the server. FQDN was used for friendly and common name. Can get to the 3 pages (ssCERDA, mobilecustomization and mobile subscription) from both the laptop that is connected to the handheld and also the handheld. It is a 2003 device so the FQDN was used for the URL in the installation item. An example URL is https://server1.domain.local:446/ssCERDA. All 443(OWA), 444(sharepoint), 445(terminal server) wer...