A lot has happened in the past while that I wanted to post about since I believe this may help a lot of people. This post will be separated into two categories: Hardware & Shipping and Software.
During the month of december I had decided to upgrade my home network to accomplish a number of goals. Firstly I have 6 children of which 5 are actively working on the home network. I was able to acquire some old throw-away PC’s from work to get my children “connected”. This has changed a lot of things regarding infrastructure needs @home, while also recognizing that my work related hardware is starting to show signs of reaching capacity. The issue to address were a) Low disk space issues b) network bandwidth issues c) some low RAM issues.
a) I carefully researched a NAS (Network attached storage) solution so that I could simply attach a device, throw a hard drive or two in there and everyone could share the space as a shared drive. I settled on the DLink DNS 323, a truely awesome device. It runs embedded linux and can be hacked to add many other features. I bought it from www.ncix.com (which we shall discuss later). I bought the DLink with a bundled Western Digial 500GB drive and they work great. The other important factor here is that the DLink offers a 1GB network connection (helping with issue b).
b) ncix happened to have the netgear Prosafe GS108 gigabit switch on sale (with mail in rebate) so I picked up one to help with some network lag we had been experiencing. It works VERY well.
c) Upgraded to 2 Gigs (from 1 Gig) RAM on my DFI motherboard, which helped greatly.
ncix shipped everything on time but Purolater (which my son now refers to as purely later) accidentally shipped the order to Ontario, then back to BC and finally after a HUGE hastle and aweful customer service from both ncix and purely later, we got the package. In the meantime my DFI motherboard died a slow death. I followed all the posts on a website that offers support (I had the DFI LanPArty UT nf4 Ultra-D), but to no avail did my motherboard come back to life. I just kept getting intermittent hangs and no boot issues. Problem here is that the motherboard is Socket 939 which are no longer made by anyone. Checkout Ebay and others who are closing out stock on these golden oldies and you might come to the conclusion i did.. time to upgrade.
Again checked out ncix.com and after more careful research I decided on the Asus Maximus Formula motherboard and an Intel Quad Kentsfield 2.4 Ghz CPU, and 2 Gig of OCz RAM. Main issue here was Windows XP wanting me to re-register XP since lots of hardware had changed. I had issues since i run using a USB keyboard and mouse, but XP did not detect them on the new motherboard because XP wanted me first to re-register XP! I dug out an old PS2 keyboard and all was fine. This time I decided to select Fedex as the shipper (which I now refer to as fed up).
ncix shipped everything on time, but Fedex at first looked like they would have delivered blazing fast. The package made it to Kelowna overnight, but alas it sat there (apparantly) for 4 days. I contact Fed Up every day asking what was going on, and they kept saying they were trying to get a hold of the 3rd party carrier they use. Ultimately I asked for a manager (his name is Abdul and he works out of the Montreal office). Abdul understood customer service! IF it wasn’;t for him I doubt I’d have gotten the package. Most likely it would have gone lost. I got the package the same day that he got involved.. thanks Abdul, you deserve a raise!
In recent month I was tasked to Convert my employers products from BDS 2006 to BDS 2007 which i had previouslyblogged about. Here are a few things I have learned since then, some related to BDS 2007 and some in the arena of ActiveX development. I shall split this section into two parts a) BDS 2007 issues and b) ActiveX development in BDS 2007.
2a BDS 2007 issues:
One set of applications I had NOT yet converted from BDS 2006 to 2007 were our performance testing suite. I left these alone as I noticed BDS2007 would pin the CPU and hang when trying to compile out multi-threaded modules. This week I was given the task to determine what was wrong. Here is what I found, it appears that BDS 2007 compiles things differently. The issue boiled down to the TThread class. It looks like there are a number of overriden versions of the Synchronize Method (no different from BDS 2006), but the 2007 compiler got totally confused and went out to lunch. Here is a simple example of some code that hangs the BDS 2007 compiler (but does not hang 2006):
typedef void __fastcall (__closure * TMyThreadSynchronize)(TThreadMethod Method);
class TMyTestThread : public TThread
__fastcall TMyTestThread( bool CreateSuspended ) : TThread( CreateSuspended )
// This line hangs the compiler in BDS 2007!!!
//TMyThreadSynchronize pOnSynch = (TMyThreadSynchronize)(&this->Synchronize);
// This line gives an appropriate compiler error [BCC32 Error] File1.cpp(16): E2335 Overloaded ‘TThread::Synchronize’ ambiguous in this context
//TMyThreadSynchronize pOnSynch = static_cast<TMyThreadSynchronize>(&this->Synchronize);
// Here is how I worked around the issue
TMyThreadSynchronize pThreadSynchMethod = &this->ThreadSynchronize;
void __fastcall ThreadSynchronize(TThreadMethod AMethod)
void __fastcall Execute();
There is also an issue in BDS 2007 where the Debugger Crashes when you run an application in Debug mode. The key issue here is a conflict with a Logitech Webcam driver. For the details and a solution see (http://blogs.codegear.com/nickhodges/2007/06/13/35998). Also looks like there might be updated logitech drivers see (http://coding.derkeiler.com/Archive/Delphi/borland.public.delphi.non-technical/2007-10/msg02390.html)
2b. ActiveX development in BDS 2007:
One item I was asked to do was to see how much effort it would take to “webify” some of our non-web products. I spent a week and a half looking at the current state of affairs in relation to ActiveX support in BDS 2007 and Microsofts current situation. I was both surprised and pained going through the exercise. The surprises came from the Borland side of things. Borland seems to semi-support ActiveX but mostly has adandoned its efforts in this area. Once upon a time they put lots of effort into ActiveForm’s etc. but the 2006 and 2007 IDE tell the story. No deployment wizards (as the previous IDE’s had included) and help files refereing to things that don’t exist in the IDE anymore. My activeX experience came in two parts.
Part A was to try to get something working in a web page as an activeX control.To do this there are a number of good articles from people (old articles mind you) that help you get the basic idea of what you need to do so I won’t cover that here. I created an ActiveX library as the container, added an ActiveForm and was off to create my demo. The process went mostly ok, I added new UI items to the ActiveForm and added code as required and it all compiled fine. There are two approaches you may take when deploying your ActiveX project, with or without dependent DLL’s and Packages. Ultimately I decided on deploying WITH packages and stored all the files in a CAB file with an INF describing how to install everything. Again there is much on the web talking about how to do this, the key thing I found that wasn’t so well mentioned / documented was the order of things in the INF file are critical! You MUST list files in the [Add.Code] section in order of MOST dependent DLL / BPL to the least dependent, making sure the OCX containing your ActiveX control is the first line. I noticed that when trying to deploy on some PC’s it would partially decpress the CAB file and not display in the clients Web page… as though something crashed or went wrong behind the scenes. I used depends (dependencywalker.com) to determine what order to list things in. I also noticed for VCL related DLL’s and Packages you MUST add fileversion info etc. To be helpful here are the contents of my INF file as I conclude this blog entry: