Hello , We are trying to access some functions written in our "SAP R-3 system" using a remote function call. SAP R-3 also generates C Code which we can use to compile interfaces that can test these functions. The text file that comes as a help file when we generate code says that it is meant for generating executable. It however mentions nothing about the code being generated not being fit for using as a dll. I generated C Code for one such function and then made an .exe project using Visual C++ and tested it and it seems to work fine just as the documentation claims. However when I use the same code to create a Visual C++ dll projet everything works and I get to the point of making the dll. But when I register the .dll file using REGSVR32 I get an error that reads "the dll was loaded but the DLL Server Register Entry point was not found." I do not know, what is it that I am doing wrong here. Or rather my question would be 1). What special things need to be added or removed or taken care of in my C Code when I am trying to compile it into a DLL 2). I am attaching the code below, that I am using to compile into a DLL. Please feel free to have a look and tell me if there is something you feel that's causing the trouble. Any help with this is deeply appreciated. Regards , Pradhip.S ----------------------------------------------------------- // Code generated by SAP and Visual C++ together. // SAPCConnect.cpp : Defines the entry point for the DLL application. // #include "stdafx.h" #include "saprfccl.h" #if !defined(SAPonWINDOWS) && !defined(SAPonNT) #define __min(a,b) (((a)<(b))?(a):(b)) #define OUT(text,pos) printf("%*.0s",pos,text); printf("%s\n",text); if (outfile!=NULL) fprintf(outfile,"=%s\n",text) #endif #define NL printf("\n") BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { return TRUE; } /* ------------------------------------------------------------------------ SAP AG - R/3 Remote Function Call Interface Generation RFC_ANSIC_CL_EXP EN 46C 07/19/2004 20:49 Complete ANSI C client example saprfccl.c ------------------------------------------------------------------------ */ static FILE *infile,*outfile,*logfile; void LOG(const RFC_HANDLE hRfc, const char *text,const char *str) { if (logfile!=NULL) { fprintf(logfile,"%d %s %s\n",hRfc,text,str); fflush(logfile); } } typedef void (WIN_DLL_EXPORT_FLAGS * R
Pradhip
Posts
-
Error Registering DLL but not .EXE ?? -
Fill Text in password typpe textboxHi , I am using cookies in my login page in ASP.NET to auto-fill in UserID and password if the user is coming to my webpage the second time or third time. The cookie section seems to work fine. It gets both the userid and password value from the cookie on the client machine.However when i try to autofill it it only fills the userid textbox. The password text box never gets filled up. But if i place a label below my password textbox and populate the label's text value with my password that seems to work. It almost seems like i am missing to turn off /on some property in my password text box. Can somebody help me with this please. I am placing the same question the second time in this forum. Regards , Pradhip.S If a Building is Completed then why do they call it BUILDING ??
-
What a load of crap!Hi Alvaro , That's definitely the only way. But if you have vs.net its quite easy. And i don't quite think its that much of a no brainer in Java..I know people who have spent man days together to just get it all work after having put all their class files in god forsaken places with no source control. So if you have VS.NET and Source Safe its quite easy. Regards , Pradhip.S Why have parking lots in bars when drinken driving is prohibited :confused:
-
ssl and asp.netHi , I am sorry.. I cannot give you any answer to your question as i don't know much about this. Infact the reason why I am mailing you is that soon one of our applications in ASP.NET might start getting some money handling capability and we were thinking of looking into SSL to encrypt our pages BEFORE we start this thing. But as we have never had any previous experience with this i was thinking if you could tell me a good place to look around for information about what needs to be done,what resources are needed and so on. Regards , Pradhip.S If a Building is Completed then why do they call it BUILDING ??
-
Password Textbox and CookiesHi All , I am wondering if i'm missing something here. This appln is in ASP.NET and VB.NET I have a log in page in which the user has the option to allow cookies store and retrieve password. The cookie file gets written with the userid and password when he is in the page the first time and when he goes to the page the next time I am able to get the userid in the textbox in the form but not the password. However if i changed the password text box type from password to singleline then i am able to see both the userid and password. So..I am wondering if there is a workaround that i am missing or just not plain not possible to have any event to write it to a text box with password as its type for security reasons. Any help is greatly appreciated. Why have parking lots in Bars when Drunken Driving is a grave crime ?? :confused:
-
Non Serializable object for Web-ServiceHi , I am using websevices in my asp.net application. The environment is VS.NET and all coding on vb.net One of the functions involves saving a file to the location. When i try passing the system.web.httpcontextfile to the webservice which would then save it on the web-server i get an error message that reads "System.web.httpcontextfile cannot be serialized because it does not have a default constructor." Can anybody suggest a work around for this. Or is this something that we have to live with when using a web-services. I did read a lot of articles that suggested using remote services and also raved about remote services being better than web-services for complex objects handling. But my issue is that System.web.httpcontextfile is a built in class and not really my own class to make it a remote object. If a Building is Completed then why do they call it BUILDING ??
-
ASP.NET Error HandlingHi : I am developing this application in ASP.NET and VB.Net. I am trying to do some Error Logging. Based on all the stuff written out by many people i have decided to handle it in the Global.Asax application_error event. In this event i redirect the control to a page called frmError.aspx This is the code i have to try capturing the details of the error that occurred. 'Dim exceptionExError As New Exception() 'exceptionExError=Server.GetLastError 'Label_Temp.Text = exceptionExError.Message All the articles written either use 'exceptionExError=Context.Error.GetBaseException or 'exceptionExError=Server.GetLastError For some reason this piece of code just keeps cranking and then ultimately renders the frmErrorPage.aspx as not available. However the frmErrorPage.aspx gets displayed when i remove this section of the code off. So i do not realy understand what's wrong with this code. Thanks in advance for the help. Regards Pradhip.S If a Building is Completed then why do they call it BUILDING ??
-
Update Challenge on DatagridHi Paul: At times can manbe any foolish than i am.It was the Damn Postback.. At i just never bothered looking at it.I am now sitting here feeling outright stupid. Paul Ingsley's suggestion was what caught me pants down.. Your time was deeply appreciated.Thanks so much Regards Pradhip.S If a Building is Completed then why do they call it BUILDING ??
-
Update Challenge on DatagridHi Paul: Yes I am struggling with it and have now infact already am going to develop a new form that is st fwd until this works.And i ahve also sent you the code and codebehind page in a notepad format. If a Building is Completed then why do they call it BUILDING ??
-
Update Challenge on DatagridHi Paul: Well..I am actually at home and so i dont have the code with me.Infact i even tried posting the code but then it looked so meesed up i took it off.Is it okay if i send it as a word file to you.Looks better then. And counterpointing your shot.I could be doubling up the data and so probably im seeing the old data on the form.I say this because i knwo for a fact that i don't set the datasource to nothing and then reset it to the new value.So its possible. But i don't see any changes on the database either. And that's what worries me. I lost the entire day fighting this. Regards Pradhip.S If a Building is Completed then why do they call it BUILDING ??
-
Update Challenge on DatagridHi Paul: So then are you suggesting that once the update is done(assuming it's carried out) this update must be carried out on the dataset also. So must i do this dddatagrid.edititemindex =-1 statement just say dddatagrid.databind() instead of dddatagrid.edititemindex =-1 objDataSourceShippedorders=objOrders.GetShippedOrders dddatagrid.datasource=objDataSourceShippedorders dddatagrid.databind() But what i don't understand is how does it affect the end result.Because to me objDataSourceShippedorders would be the more accurate result if the databse was updated.So still its hould give me the same answer. My issue looks like when i update a value in the edit mode and then press update it never quite seems to pick up that new value.Something like a postback problem on drop down boxes when we do not have if not page.ispostback clause . If a Building is Completed then why do they call it BUILDING ??
-
Update Challenge on DatagridHi Paul: Yes i am doing the update.Infact on the update section of the code i have a statement ,that will print out on a label on the form, the actual sql statement that was executed on the database.It is in this statment thati found out that the update statements take only the old values and not the new values that i changed. Yes i do refresh the datagird.What i do after update is , iset the edititem index to -1. Then i populate a dataset with a stored procedure that is same as the on in the page load event and bind this dataset to the datagrid. All this is done on the update section of the code. Regards Pradhip.S If a Building is Completed then why do they call it BUILDING ??
-
Update Challenge on DatagridHi All: I code in VB.NET I have a funny issue.I have an Datagrid with a few bound columns and also an edit column.This edit column works and i have the update and cancel buttons come up when i click on edit. Then i also have the update function written in the Code Behind Page.Thsi function works because when i tell it to writhe SQL update statement on a label it writes it out.But my challenge is on the update mode any value that i update on a column does not get reflected after i press the update column. For eg:- if i change a column from 1/1/1900 to 10/16/2000 which is princiapply the update i want to make the sql statement that runs on the database contains only the old value 1/1/1900.It is as though it's not being able to pick up the change i make in the edit mode. If some body could tell me why this is happening that would be great.Anything that i have to modify in the datagrid or something If a Building is Completed then why do they call it BUILDING ??
-
Problem with an event being handledIn VB WE GENERALLY HANDLE EVENTS LIKE private sub btn_Click(object as sender, e as System.Eventargs) handles Btn_click.cliked --- --- --- ---- end sub the handles key word is impt and denotes what the event handles.This is using the codebehind page model.So there must be some equivalent in c#.Look out for that piece of info. Hope this helps. Pradhip.S If a Building is Completed then why do they call it BUILDING ??
-
Session_End EventI can change the Session timer in IIS setting for that appln or at the web config file.And yes the browser does not seem to fire the seesion-close event. On the contrary it seems the IIS kind of closes the session just after its timed out and its during this closing session that the session_close event gets fired. But the time gap between the session timeout and the session_close evnt to fire takes awfully long.Infact i'm at loss as to whats to be done. If a Building is Completed then why do they call it BUILDING ??
-
Session_End EventHi: I am wondering when exactly does the Session_End event fire in ASP.NET . It does not on the browser close event.Some say it's fired just after the Session_Timeout event occurs. So i have a piece of code just like in asp to find out who are all the active users on my website.The Session_Start event fires and user count is incremented.I have a corresponding user_decrement step in Session_End.The application is set to 1 minute. Now i open a browser window and usercount is 1 at 5.16pm and then i close window IMMEDIATELY. Then immeditaely i open another and browser and usercount is 2 at 5.16pm and i close it immediately. then i open another at 5.18pm and usercount is 3 while i expected it to be 1. AND THEN I openone at 5.22pm and the user count is 4 while i expected it to be 1. So now im surprised.Does the session-end event ever fire at all?? Or am i missing something somewhere?? Any help is appreciated.. Regards Pradhip.S If a Building is Completed then why do they call it BUILDING ?? If a Building is Completed then why do they call it BUILDING ??
-
Session_End EventHi: I am wondering when exactly does the Session_End event fire in ASP.NET . It does not on the browser close event.Some say it's fired just after the Session_Timeout event occurs. So i have a piece of code just like in asp to find out who are all the active users on my website.The Session_Start event fires and user count is incremented.I have a corresponding user_decrement step in Session_End.The application is set to 1 minute. Now i open a browser window and usercount is 1 at 5.16pm and then i close window IMMEDIATELY. Then immeditaely i open another and browser and usercount is 2 at 5.16pm and i close it immediately. then i open another at 5.18pm and usercount is 3 while i expected it to be 1. AND THEN I openone at 5.22pm and the user count is 4 while i expected it to be 1. So now im surprised.Does the session-end event ever fire at all?? Or am i missing something somewhere?? Any help is appreciated.. Regards Pradhip.S If a Building is Completed then why do they call it BUILDING ??
-
Passing Column Names in Stored Procedures.Hi: I have this challenge that i am sure many of us would have faced. I want to write a stored procedure that has to list out all company names based on whether one of the characteristic has value 1.. For eg: create procedure (proc_name) @paramcharacteristic varchar(40) as select * from tblcompany where @paramCharacteristic=1 Now this @paramcharacteristic will always match one of the column names in the table like Performance,Satisfaction,Profits and so on.But this does not seem to work. When i run the stored procedure from an application i get the error Cannot convert varchar 'Satisfaction' to integer.So i think what it does is try to compare the value of @paramcharacteristic variable and 1.But instead i want SQL to understand the statement as select * from tblcompany where Satisfaction=1 Where do u think should i make the change.In the definition of paramcharacteristic in the stored procedure??Pls give me some suggestions.On how to deal this situation.. Thanks in advance for the help.. Regards Pradhip.S If a Building is Completed then why do they call it BUILDING ??
-
DataGrid InversionHi: I have a case where in i need to display about 40 columns or so for a single record(row).So it could be nice if somebody could tell me what do i need to do to get the DataGrid Inverted so that all rows become columns and all columns become rows. Eg:- Name: Adam Jones City: Omaha County: Douglas State: Nebraska Country: U.S.A The above is the format i would like instead of having it in the usual way. Thanks in advance for the help.:). Regards Pradhip.S If a Building is Completed then why do they call it BUILDING ??
-
Error Handling Drilling DownHi All: First and Foremost Merry Christmas and Hapy New Year.. And then now my challenge..We have all our Data Access Operations for any application through an COM object that was then rewritten using VB.Net. Now this object has a piece of code that does nothing but it is meant to handle any exception that arises out of our dataaccess operations.Now this was cool to start off with.But with the applications getting bigger we would prefer handling errors at application level after each operation for better understanding and maintenance. But the problem is even if i give the error handling code to handle exception on my application code it does not seem to pick it up because the error is being handled even before within this data access object.Becuase it drills down and get the error at that point. Is there a way i can specify somewhere in my application code not to do this.I mean can i tell "Use this error handling code right below and dont use the one available in data access object" Please let me know of articles,links that can help me understand error handling better in applications. Regards Pradhip.S If a Building is Completed then why do they call it BUILDING ??