Unhandled execption in ariel.exe(APIOCX):0xC0000005 :Access violation

Can you help me to find out the mistake i am doing while calling the
dll...............
i am really thankful to you for your time and support....

"Unhandled execption in ariel.exe(APIOCX):0xC0000005 :Access violation"
whenever i debug my code i got this error....

Dll function :  	short setQuoteToDB(
		BSTR* strDateTimeStamp,
		short* intMarketNo,
		BSTR* strMarketName,
		BSTR* strBid,
		BSTR* strAsk,
		short* intMarketState);


code:

typedef int (CALLBACK* Set_Quote_DB)
                                  (unsigned short**,
                                    short*,
                                    unsigned short**,
                                    unsigned short**,
                                    unsigned short**,
                                    short*);

void CArielProjectVer2Dlg::OnPriceChangeArielapictrl1(LPCTSTR
SessionId,
		                                                           LPCTSTR
RequestId,
					            short MarketNo,
					            LPCTSTR Market,

                     LPCTSTR   Bid,

                     short BidDirection,

                      LPCTSTR Ask,

                      short AskDirection,

                      LPCTSTR High,

                      LPCTSTR Low,

                      short MarketState,

                      LPCTSTR Timestamp)
{
	// TODO: Add your control notification handler code here

	SessID=SessionId;
	CurrentRequestId=RequestId;

   	marketno.Format("%d",MarketNo);
	bid_d.Format("%c",BidDirection);
	ask_d.Format("%c",AskDirection);
	marketstate.Format("%d",MarketState);

    m_MainEdit= SessionId  + RequestId + marketno ;
    m_MainEdit=m_MainEdit +  Market + Bid + bid_d +  Ask +ask_d + High
;
    m_MainEdit=m_MainEdit + Low +  marketstate + Timestamp + "\r\n";

       UpdateData(FALSE);
       iLineCount=m_EditCtrl.GetLineCount();
      m_EditCtrl.LineScroll(iLineCount);

   HINSTANCE hInstance =
AfxLoadLibrary("C:\\ActiveXdll\\WartzODLCOM.dll");
   if(hInstance != 0)
	{
	//    error  Unhandled execption in ariel.exe(APIOCX):0xC0000005
:Access violation

                  MessageBox("load dll");

	USES_CONVERSION;
	BSTR bsTimeStamp = A2BSTR(Timestamp);
	BSTR bsMarket    =  A2BSTR(Market);
	BSTR bsBid       = A2BSTR(Bid);
	BSTR bsAsk       = A2BSTR(Ask);
                Set_Quote_DB SetQuote;
	SetQuote = (Set_Quote_DB)GetProcAddress(hInstance,"setQuoteToDb");
	if(SetQuote != NULL)
	{

SetQuote(&bsTimeStamp,&MarketNo,&bsMarket,&bsAsk,&bsBid,&MarketState);

		return;
	}

    	SysFreeString(bsTimeStamp);
	SysFreeString(bsMarket);
	SysFreeString(bsBid);
	SysFreeString(bsAsk);

	FreeLibrary( hInstance );

	return;
	}

0
pasurjan (15)
12/18/2006 8:17:08 AM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
341 Views

Similar Articles

[PageSpeed] 56

If youn are getting an access fault on a LoadLibrary call, it means you have done
something wrong in the DllMain:DLL_PROCESS_ATTACH code.  At that point, you should be in
the debugger studying what has happened.  Why have you not reported what the debugger is
telling you?
				joe

On 18 Dec 2006 00:17:08 -0800, "priyanka" <pasurjan@yahoo.com> wrote:

>Can you help me to find out the mistake i am doing while calling the
>dll...............
>i am really thankful to you for your time and support....
>
>"Unhandled execption in ariel.exe(APIOCX):0xC0000005 :Access violation"
>whenever i debug my code i got this error....
>
>Dll function :  	short setQuoteToDB(
>		BSTR* strDateTimeStamp,
>		short* intMarketNo,
>		BSTR* strMarketName,
>		BSTR* strBid,
>		BSTR* strAsk,
>		short* intMarketState);
>
>
>code:
>
>typedef int (CALLBACK* Set_Quote_DB)
>                                  (unsigned short**,
>                                    short*,
>                                    unsigned short**,
>                                    unsigned short**,
>                                    unsigned short**,
>                                    short*);
>
>void CArielProjectVer2Dlg::OnPriceChangeArielapictrl1(LPCTSTR
>SessionId,
>		                                                           LPCTSTR
>RequestId,
>					            short MarketNo,
>					            LPCTSTR Market,
>
>                     LPCTSTR   Bid,
>
>                     short BidDirection,
>
>                      LPCTSTR Ask,
>
>                      short AskDirection,
>
>                      LPCTSTR High,
>
>                      LPCTSTR Low,
>
>                      short MarketState,
>
>                      LPCTSTR Timestamp)
>{
>	// TODO: Add your control notification handler code here
>
>	SessID=SessionId;
>	CurrentRequestId=RequestId;
>
>   	marketno.Format("%d",MarketNo);
>	bid_d.Format("%c",BidDirection);
>	ask_d.Format("%c",AskDirection);
>	marketstate.Format("%d",MarketState);
>
>    m_MainEdit= SessionId  + RequestId + marketno ;
>    m_MainEdit=m_MainEdit +  Market + Bid + bid_d +  Ask +ask_d + High
>;
>    m_MainEdit=m_MainEdit + Low +  marketstate + Timestamp + "\r\n";
>
>       UpdateData(FALSE);
>       iLineCount=m_EditCtrl.GetLineCount();
>      m_EditCtrl.LineScroll(iLineCount);
>
>   HINSTANCE hInstance =
>AfxLoadLibrary("C:\\ActiveXdll\\WartzODLCOM.dll");
****
Of course, in a real program you would NEVER, EVER hardwire a path like this!  Ever!  You
would compute it based on any number of algorithms, but it would never, ever appear like
this.  Fine for a smoke test, but don't deliver anything that has a hardwired path in it.
This will be a complete and total disaster for the end users.
****
>   if(hInstance != 0)
>	{
>	//    error  Unhandled execption in ariel.exe(APIOCX):0xC0000005
>:Access violation
>
>                  MessageBox("load dll");
>
>	USES_CONVERSION;
>	BSTR bsTimeStamp = A2BSTR(Timestamp);
>	BSTR bsMarket    =  A2BSTR(Market);
>	BSTR bsBid       = A2BSTR(Bid);
>	BSTR bsAsk       = A2BSTR(Ask);
>                Set_Quote_DB SetQuote;
>	SetQuote = (Set_Quote_DB)GetProcAddress(hInstance,"setQuoteToDb");
>	if(SetQuote != NULL)
>	{
>
>SetQuote(&bsTimeStamp,&MarketNo,&bsMarket,&bsAsk,&bsBid,&MarketState);
>
>		return;
>	}
>
>    	SysFreeString(bsTimeStamp);
>	SysFreeString(bsMarket);
>	SysFreeString(bsBid);
>	SysFreeString(bsAsk);
>
>	FreeLibrary( hInstance );
>
>	return;
>	}
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15974)
12/18/2006 5:00:48 PM
Reply:

Similar Artilces:

ERROR check if a date set entered violates a previous date set
I am devloping an excel program that has a list of date sets, not necessarily in sequencial order. What I want is an ERROR CHECK if a date set violates any date set previously entered. What I was looking for was that a discharge could not be typed in as follows: 1/10/04 to 4/20/04 2/10/04 to 3/20/04 The second date falls within the first and should be invalid setting off a message or an alert of an invalid entry. I am interested in making it idiot proof so that one could not enter dates within or covering dates already entered. This one really throws me, Please help. The answer to your quest...

odd scroll bar behaviour in access, keeps returning to top
hi i have a user here, using ms office 2003, and he has noticed that when scrolling through ms access or excel, that often the vertical scroll bar he is using will return to the top position. this is the same for excel. its a bit of an issue, as he would be clicking through databases with thousands of rows of data, and it keeps retuning to the top of the row. i did notice that a program called ifinger kept popping up as this was happening. but i could not find info on the web linking this product with the issue he is having. if any one has any suggestions, id appreaciate it. Regards ...

snapshot in Access 2007
Hi have moved to Access 2007 and now I dont seem to be able to open or read any Snapshot format documents. has it been changed? thanks A I'm not seeing this problem. I saved a query with its properties set to Snapshot, and used it as the source for a report. The report opened as expected. Something else must be going on. -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Alexey" <alexdeletethisgates@hotmail.co.uk> wrote in message news:%236Z...

change the starting vaule for an autonumber field access 2007
how do I change the starting value for an autonumber field in access 2007 (...) > how do I change the starting value for an autonumber field in access 2007 DoCmd.RunSQL "alter table Table1 alter column ID counter(X,1)" X - starting value K.P. "Richard" wrote: > how do I change the starting value for an autonumber field in access 2007 How exactly do I do that? Where do I enter that line? Sorry for my ignorance! "Krzysztof Pozorek [MVP]" wrote: > (...) > > how do I change the starting value for an autonumber field in access 2007 > >...

Access 2003 to Email issue.
I have a working Access 2003 form that has a button to open a report and send a email. This makes the report an attachment in the email. The name of the report is placed in the document as the name of the attachment. I would like to add the "variable" EmployeeName so that it appears in the attachment name. Is this possible and if so where and how do I code it to have this happen? I used to be a mindreader, but those skills deteriorate with distance. Without seeing your code, that's hard to do. If you're handy with VBA, try using it to change the name of the attachment,...

How can I use my Access list to email selective groups?
How can I use an Access List to email selective groups without having to go to my Outlook Address Book? ...

access violation caused by cstring
We are working on a project where we need to migrate some code of an old application to a new application.The old app is an MFC app,which have some functions in the application class and document class which is required by the new app also.We created a dll project which is derived from the old app(Instead of directly deriving from CWinApp).So the hierarchy is as follows CWinApp<-Old app(COldApp)<-CNewDLLApp When the CNewDLLApp object is created(When LoadLibrary() is called),an access violation error is happening.It is caused in the constructor of COldApp where it is initialising a CStr...

Access Databases, MFC and VS2005
Okay. I'm going to try and ask this as succinctly as possible. When using an Access database in my apps, I've had to derive a recordset for each table. Before you laugh, consider that there are all of 3 tables in each, and each of those has less than 20 columns. My preferred way of using this techniques is to use the wizard to create a class derived from CRecordset and indicate the desired table in the dialogs. It works well but it's a lot of code, particularly if I want to do anything relational between tables. I have read and re re re read the MS docs, but I cannot seem to ...

download file WindowsXP-KB936929-SP3-Express-x86-ENU.exe incomplet
Windows update states 66MB file to download but the download through the update process ends up with only less than 3MB and update install fails. I tried dozens of times but always with same failure. Anybody faces the same issue? Any solution or known work around? Thanks Give this a try and see if it solves the problem................ <http://support.microsoft.com/kb/950718> "Laurent" wrote: > Windows update states 66MB file to download but the download through the > update process ends up with only less than 3MB and update install fails. > I ...

Allow only one user to access workbook at a time
I need to set excel to allow only one user at a time to access a workbook. The workbook is NOT a shared workbook, but it resides on a network share. Multiple users need to access it, but only One at a time. I want all other users to get a message that the file is in use and they can not open it. Is this possible? I believe that is the standard behavior of a network file that is not shared; users who access the file when it is in use get a message the file is in use and whether they want to open as Read Only. -- Greeting from the Gulf Coast! http://myweb.cableone.net/twodays "Emir_of_sh...

Access--Form View & Print Preview Display
I have made a form in design view with a page setup of legal size, top, bottom and side margins of .4. I can see all the fields in design view, but when I "view" in Form, I only get the first page with 3/4 of the vertical page showing. I have all the fields showing in horizontal view. In Print Preview, I get only 3/4 of the first page. It will kick me to a second page, but nothing prints except the shaded box of the background. Will appreciate any suggestions. -- GEK ...

Configuring Domain Name for internal/external access
Well I sort of think i've got it right. Please comment on the following points: 1. I have created an internal domain name of "audor.org" the system has registered this as "remote.audor.org". 2. Our external domain name is www.acdorchester.org. 3. I now need to purchase a domain name of www.audor.org and point the A record to the fixed IP address ISP has given. This will allow external access for management and roaming staff. Please comment and advise on any changes necessary. I am not sure if I really need to purchase another one? -- happyhacker -...

Access 2003-Access 2002 Incompatibility
I updated an Access 2002 db using Access 2003. Now when I try to run the db on Access 2002 I get an error message that says: Access contains a missing or broken reference to file msador15.dll version 2.7 What can I do to fix this problem? Or more generally, what do I do to ensure that dbs created or modified with Access 2003 will still run on Access 2002? Thanks. Have MDAC 2.7 been installed on the machine that's attempting to use the database? -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Chaplain Doug" <anonymous@discussio...

access 2000 converting text to number format
a database in my office was created and the person who designed it put every field in a table as a text field. the numbers that are in those fields need to be change to a number to related to other tables. is there VB code or script to change it? or any other waY? Can you change the data type of the field to be Number? ...

Unknown Service
Hi, I'm not sure where to post this question, so I started it here. Windows XP sp3, under SERVICES, I found a new unidentified service named: VIVWFIOSAZP.EXE. The only thing I can see is that this exe file is in a temp directory: C:\DOCUME~1\Britt\LOCALS~1\Temp\VIVWFLIOSARZP.exe I have no idea what this service is or where it came from. Anybody have any suggestions? Thanks Britt "Scott-az" <Scottaz@discussions.microsoft.com> wrote in message news:8830002F-20A4-46AB-A08F-0D6E792DEF6B@microsoft.com... > Hi, I'm not sure where to post this questi...

Converting Access to MS SQL
I got a big Access file (1 400 tables) to convert to SQL and I would > like to be provided with some automated tools, except upsizing wizard > and DTS, to convert it on my own. > > I got a lot of forms and query to convert too. > > I analysed a tool suggested by Douglas last week, but it convert only the data, and not the froms and query. Can someday provide me with other tool name ? > > Thanks, > > Guy As I told you before, SQL Server doesn't have forms and queries in it: it's a database only. Therefore it's impossible to find a product that will co...

Extranet Configuration of project web access
I have installed Microsoft EPM with in two server installation. and now I need to configure extranet environment . but I am confused to understant host header , load balance url , alternate access mapping. I extended my web access site . but further what i need to do . then my site will be an accessible from anywhere. I am bit confused. although I study technet pages . but confused kindly tell me step by step. Kindly tell me the solution as soon as poosible. Regards Hello Sam. Hopefully this link will help explain some of those keywords and how you go about configuring ...

Access Deleting a Query SQL
Hi all, I am working with a multiple parameter search query. The form I am using to conduct the search displays the results in a subform. I have gone through and really combed through the SQL to make sure there are no blatant spelling errors or incorrect references within the code. Anyways when I open the form that it is attached to, I keep getting the boxes described in this website http://allenbrowne.com/bug-13.html .. The form is open, and I even changed names of fields in the table in case SQL was choosing to be picky about what I named my fields. Is there anything else that would cau...

Downloading Msgs From Outlook Web Access to Local HDD
Hey Everyone, I just got assaigned an email account for college next fall. Their method of checking email is Outlook Web Acess. I find this program extremly difficult to use and was wondering if it's possible to download the messeges from my account to my HDD using a program like Thunderbird or possibly Outlook Express? I tried connected via POP method- using mail.SCHOOL.edu as my incoming mail server and smtp.SCHOOL.edu as my outgoing mail server. Is it my school that is the problem or is it simply impossible to download msgs from Web Access? Thank You! -Oyster Outlook Web Access i...

Access 2003 Sorting Text
I am looking for a way to order text numbers - similar to a number list order in Word i.e. - 1,1.1, 1.2, 2, 2.1, 2.2, 3 ... etc. These are item numbers in a procedure list that I want to show on a form or report in 'text' order. The problem is that the sort order 'reads' 2.10 (two decimal ten) as equal to 2.1 (two decimal one). Is there a routine for handling this sort? Any help would be appreciated. Cheers, -- BRich am not sure this is the reply you are looking for....but it seems like the field is defined as a number - if it dropping that 0; but could/should be ...

user access deny
i forgot to say the error message in the internet when i was trying to login to the CRM server. It is "User access Error". Please help me, it is urgent case...... thanks Hi Jerry, Please double check if the user has a licence assigned and is member of a security group. I hope this helps, Ronald Lemmen Avanade Netherlands "jerry" wrote: > i forgot to say the error message in the internet when i was trying to login > to the CRM server. It is "User access Error". > Please help me, it is urgent case...... > > thanks ...

microsoft.public.access not subscribed group
microsoft.public.access not subscribed groupmicrosoft.public.access not subscribed groupmicrosoft.public.access not subscribed group ...

Convert to 97 Access Database
Hi Everyone, Have a quick question, I'm using MS Access 2007, not fully up to speed with it yet. In Access 2003 - you had an option to convert a database to a 97 Access DB >>Tools >>>>Convert Database >>>>>>Convert to 97 Access Database But I am unable to find this option in Access 2007? Any help, much appreciated Thanks Paul The option wasn't included in Access 2007. Remember that Access 97 is ten years older than Access 2007: is it realistic to expect a product to work with a 10 years old of the same product? -- Doug Steele, Microsoft ...

Problem Accessing Service Calendar & Knowledge Base
Hi, I'm having a problem accessing the service calendar & Knowledge Base. I have CRM version 3.0, I also recently reformatted my PC to a fresh install of XP Pro SP2. I has not worked on my PC since, however all the other users can acces these fine. I would appreciate some help. This problem can occur if you have the Outlook CRM client running. Try closing Outlook and all web browser windows, then opening the web browser and connecting to CRM. If this still doesn't work, try deleting all cookies on the machine -- David Jennaway - Microsoft Dynamics CRM MVP Web: http://...

Make an Access Database out of Excel spreadsheet
I have a spreadsheet with 5 tabs; all same info. How do I make a database with a form for entry of info from it? -- ahmebah ...