Blog Entries

By Chris Zinck on 5/12/2011 12:00 AM
Here’s a problem we just figured out today. Implementing the new Sage ERP Accpac desktop Icon protocol requires that you provide a DLL with three entry points that get called when the desktop initializes.

We had all sorts of trouble getting the System Manager to load and run our DLL. We messed around with different ways to export the entry points, we implemented the DLL in a pure C environment (instead of a C++ file) and we moved the code into our activation view and exposed it there. None of it would work. So, we built a completely stand alone file and erected the basic protocol with nothing else. Presto! The DLL loaded and ran.

Cool, we didn’t really understand why, but what the hell it works. We then started adding real code to make the code do something.

Uh Oh…it’s broken again. What did we do? Well, we added calls to a dependency. Another DLL that has some support code. Why would that break it?

It turns out that when the Icon Protocol DLL is called, the working directory is NOT...
By Chris Zinck on 2/24/2011 12:00 AM
About a year ago, I posted information regarding issues with DEP (Data Execution Protection) and Accpac addins written in .Net. ( While my post addressed the issue from the point of view of running the app, there is an outstanding issue of debugging this apps. Under the default situation, debugging a .Net Accpac addin that uses Accpac controls will cause the program to fail. The underlying reason for this relates to Visual Studio's use of a hosting process to run the debuggee. This process is started by launching the VSHOST32.EXE process which then launches the debuggee. The reason this generates DEP errors is that the VSHOST32.EXE process has the NXCOMPAT flag set. This turns DEP on regardless of what is set in the debuggee process binary. To solve this problem, you need to modify the VSHOST32.EXE process. Run the EDITBIN utility on the VSHOST32.EXE...
By Chris Zinck on 2/24/2010 12:00 AM
At Zinck Computer Group we’ve developed a COM component that we use in our eTransmit product to send documents by email or fax. Up till now we’ve been installing and registering the component on each workstation that uses eTransmit. This is a huge pain in the A%$# and has led to many support calls and emails.

We started considering a rewrite of the component into an old style C DLL. But recently, we’ve been experimenting with Registrationless COM.

This technique ROCKS! With some easy to setup manifest files, you can put all your COM components in your application folder and just instantiate them like you used to, no registration required.

Windows XP and up, but definitely worth the effort.
By Chris Zinck on 1/16/2010 12:00 AM
Accpac will be moving to a presentation/UI layer that is based entirely on open source tools. This is going to be a huge challenge for us at Zinck Computer Group.

For as long as we have been in business, we’ve developed software using Microsoft and Accpac technologies. We started back in the 80’s with MSC 5.0 and DOS and moved right into Accpac for Windows and Visual Studio / Visual Basic.

But now, the Accpac SDK is based on Tomcat, Eclipse, Google Web Toolkit and Java. Holy Cow Batman! What a difference!

What I’m noticing is that while most of these tools are deep and flexible, they just don’t have the product polish that something like .Net or Visual Studio has. I can’t go to a web site like MSDN and look up quality documentation.

I’m already finding it hard to get centralized information on these tools. Sure, Java is a no brainer, but Tomcat, GWT and Eclipse are moving targets and not as nearly well documented.

This is going to be a major change for us and we are going to...
By Chris Zinck on 12/8/2009 12:00 AM
Last year after we installed Vista on our development machines, we came across a problem with .Net programs and Accpac.

We’ve been writing some of our custom Accpac programs in .Net and calling the Accpac COM API to interface with Accpac ERP. But when these .Net programs were run on our Vista machines they would crash. But only when using one of the Accpac COM API’s that would pop open a window. Calling a Finder through the API or doing a ShowErrors call would instantly crash the program. Everytime.

After doing a LOT OF investigating, we discovered that the problem was related to DEP (Data Execution Protection). If we disabled DEP on our workstations, the problem would go away.

With some more digging, we came up with a theory that fits pretty well. Turns out the ATL library had some problems with DEP (up to and including V7.1). They do some kind of runtime code creation for thunking that makes DEP think the program is trying to run data. And then DEP causes the program to crash. Guess who uses ATL components in their COM API? Correct! Accpac! Everytime we used the COM API that opened a window of some kind, an ATL component was called and BAM! Down it goes.

By Chris Zinck on 10/2/2009 12:00 AM
We had a problem last week regarding a custom Accpac view we were developing. It was a straight flat file view with no business logic. We cobbled it together basically to get the table created in the database with the appropriate data dictionary entries. We’ll never call it except for the initial ViewCreate call.

The problem was that it would load fine on our development workstations but not on the customers server. After scratching our heads a bit, we ran DEPENDS on the DLL to see if there were any missing dependencies. Sure enough, it was reporting that it couldn’t find the Visual C runtime (V8). Since Accpac uses the same runtime, we couldn’t understand what was going on.

Turns out that the default build in the Accpac SDK uses the –manifest switch. This embeds a Windows manifest file in the resources of the DLL. The manifest specifies the build of the MSVC runtime and sets it to the newest version on the build machine. Since we had a newer version than what was loaded on the customers machine,...



Recent Entries

How we built Murphy's booking system
Murphy's web store goes Live
Problem with new Desktop Icon Protocol
Debugging .NET Accpac Addons
Registrationless COM
Moving from MS to Open Source
Board of Examiners Christmas Lunch
Sage ERP Accpac 5.6 has been released
DEP, .NET, Windows and Accpac