Business Function Causing Memory Violation while running on the server

msp1000

Active Member
Hi,

I have a custom BSFN when run on the server gives an "Memory Violation". On fat client the business funtion executes without any problems. Appreciate any help on this..

"EventRule: Business Function PrintSIP at line 8 for the Event 13 in Section Work Order Header - Report All Columns has caused a memory violation"

Thanks

E1 9.0 (Tools 8.98) / Win2003 / MSSQL
 
msp1000,
Your post has very insufficent info. for us to help you out.

Thanks,
Chan
 
Some more info would be great. What all does this BSFN do? Are all your calls to client/server apis? You built this BSFN client/server? etc....
 
Have a custom business function(BSFN) that does explicity linking to a third party DLL using LoadLibrary, GetProcAddress, etc.

On full client workstation the business function executes without any problems. However, when attempting to run the business function on the server, get a memory violation.

This business function does only API calls and is built with client/server.

Thanks

E1 9.0 (Tools 8.98) / Win2003
 
when you said third party dll and loadlibrary, it brought back bad memories!! Naw just kidding, You need to check out "Calling Conventions" or check out post #77627 (Thanks BOster!). I was having the same problems you were and the solution in the post worked for me. Hope this helps you as well.
 
I think I had the same issue as the OP, and may be able to give a better explanation.

We have a custom business function in our CCUSTOM dll that has always been a client-only. However, we wanted to change it to run on client and server. We made the necessary table changes, adjusted the code, and put all the required objects on the server. We built the function, sent it to the server, and tested on our client. Everything was fine on our client, but when we tried to run it on the server, it would crash. In fact, the line that it would crash on was the initialization line - where the function is defined but before any inside code is executed.

We tried the more obvious settings, making sure the code was compatible, submitting version specs, but eventually just gave up and set it back to client-only.
 
Thanks for taking time to reply to my post.

I have done byte packing, used calling conventions(__cdecl)and now it gets stuck at a point when trying to establish a connection to the printer. I am using "CreateDC" function

dc = CreateDC(NULL, lpDS->szPrinterName, NULL, NULL)

I have also tried using wsprintf function.

I really appreciate helping me on this, I have been working to resolve this issue from past couple of weeks.

Thanks


E1 9.0 (Tools 8.98) / Win2003 / MSSQL
 
So that got you past your problem correct?...Now im not even going to lie to you with the printing, i have only done very very little printing in C++. However you can create a print class in C# with there printdocument type (pretty easily at that) and then call that from your dll. I have done that and it works very well.
 
[ QUOTE ]
So that got you past your problem correct?...Now im not even going to lie to you with the printing, i have only done very very little printing in C++. However you can create a print class in C# with there printdocument type (pretty easily at that) and then call that from your dll. I have done that and it works very well.

[/ QUOTE ]

Yes I have past that memory violation error. Now it is failing while loadlibrary.

Thanks for all your help.
 
Back
Top