Technology & Programming Enthusiast blog

<
OMNITECHIE
 

A C Runtime library reminder , Static vs Dynamique version

February 9, 2009 13:13 by Rickron

Recently I got good programmer involved into this frequent trap. They didn't see any problem to link statically to the .LIB version but to only have a bigger module size. This is a simple reminder to expose the difference between the DLL and the .LIB version of the C Runtime library as the possible settings for code generation tab.

The best solution should be to use the DLL version and avoid most problems. But still if you feel comfortable in C and prefer the .LIB version here's this indication: memory allocation made with new and malloc should always be freed in the same module where they are allocated. It pertains only to the .LIB version. For each module (EXE or DLL) that is linked statically to the .LIB version , each module has its own chained list of memory block. The explanation is in the name : "static". When the .LIB version is linked at compile time you have separate set of global and statique variable for the module that will use them. Another time I will probably have a more complete and detailed explanation. Have a good day.


Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Old programming book collections

December 14, 2008 12:25 by Rickron

This post is targeting mostly  old programmers but in my case I had a important collections when I was not not old.

 

Then do you think there is any value to your old computer book ? As comic book are gaining value with time in my situation they help me so much. So far I have old win16 book (borland asm compiler doc, borldand C++ 3.1 suite) that I something like to read just for fun to see how much geek I was compared to  today (and so easy it is today in this garbage collector language world). By example would you be able to find a book about the runtime library ( I still have  the standard C library from Plauger) ?   Younger people would probably laugh (at least only if they never had homework using C language). But no jokes , in this book I never have found the litthe tricky details I was finding in MSDN documentation.  

I have noted that with time some books titles are not always re-edited (with most recent platform ) . By example DCOM and COM ,the bare use of C++ on the most recent OS is still an important use in development. But I have a lot of difficulties to find as much variety I was used to find at the end of 90' in libraries. Also  for c++ development on windows vista the only most up to date book I have considered is Windows via C/C++ (the fifth edition of the Advacned Windows bible) and so far I didn't find any book in the same domain that cover the service development by example. In the 2 last edition there are the topics about overlapped file operation topics that are not easily covered. There was probably this book from addison wesley something like "Win32 System Programming" that was also going through security topic but you won't find as much details as you'd have find with Keith Brown title "Programming Windows security". Unfortunately  I think this is not confirmed the latter one has been re-edited for the .net framework only. Even MFC library is suffering. As a lots of possibilities appears with the introduction of the office 2007 controls in the MFC ......you cannot find a single book to help you in vs2008. Ok MFC are probably targeting older programmer but since the control is only available in the MFC I think it would have been valuable to provide younger with learning material to help to use it. There was also the both excellent "Programming Server-Side applications for Windows 2000". I didn't see any re-edition of this book.

I know most people goggle for their code snippet but only goggling will not help you get concept. By example I always wondered what do explain the use of the __stdcall call conventions. Lot of people are probably used to export DLL functions without any concerns but much of the recent OS are probably layout on the precious performance aspect following that since the callee is responsible to unwind the stack lots of the caller side code is avoided. Or did anyone wonder Or did you find a lot of book about kernel debuggin for windows. I found 2. One is for windows XP but solely to help protect yourself against hacker(  I do not remember the name)  and the other just back to me is the Advanced Windows Debugging book. And frankly , given the buzz around the garbage collector language and the .net stuff I do not expect to see a lots of these coming next. It suffice that you search on amazon to understand. Am i wrong , I have read somewhere that Vista was still for its most part developed in C/C++ and I think and I never saw until now driver developed in c#. You are asking to young software engineer fresh out of the school to be able to master the  .net stuff and still to get by themselves in kernel programming (no explained document , the msdn is for reference only and goggle I think is a big waste ). May be there are the old well known code repository web site that with their 10 pages article that will help you.

 We are in a javacript era and app running on browser are pretending to soon mimic our favorite desktop application. But until we have all the fiber optics in the wall and 100 gb/s broadband (or something equivalent to a PC data bus),  I don't see how the lack of  windows c++ learning book to the benefit of the .net or ajax ones will help us in the long term.

Well it seems I have again disgressed just a little bit from my first subject if someone was still doing collections from their old programming books.It looks like I am not giving only a nostalgic value to them...

What is your opinions ?  What are your oldest programming books ?

Why do you keep them in the dust ? Or are thay still of any usefulness maybe ?

 

 P.S.: Recently I had to waste few of them , like the java book from which I had never been able to find a job anyhow.

 

Rick


Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5