Tuesday, May 10, 2011

Unforgettable moments at PTC - II

And here is my last day and my last blog from the desktop of this company :). As compare to yesterday I am pretty relaxed today.
Completing few HR and finance formalities.
Will surely miss my PTC colleagues.
Lets see what new company has got for me.

Monday, May 9, 2011

Unforgettable moments at PTC - I

Its my second last day at PTC. After few hours I will leave for my flat and will come back again tomorrow which will be my last day. My heart beat has increased, I am shivering, feeling heat, thinking a lot and thats just because tomorrow is my last day.

I have enjoyed my last 3years at PTC. I started as a fresher. Its so unlike that I have done a Bsc(PCM) and end up doing a job in a Product base Company and that too in C/C++. I think it was my perseverance which landed me here.

Thanks a lot to my manager Amit Chordia. Such a cool guy. He has been a true mentor to me.

Monday, May 2, 2011

Export/Import a static variable

I faced a scenario in which I required to export/import (from/to a DLL) a structure pointer variable declared as NULL in a .cxx file.

static Notify_struct *ptr_name = NULL;

Now since it a .cxx file I can't use my Export/Import API, because in-case this file is read undet dllimport it will report compilation error as 'definition of dllimport not allowed'.
So, I moved declared this variable to a header file like this:

extern DLLEXPORTIMPORTAPI Notify_struct *ptr_name ;

This made the DLL to export this variable easily.
Few points to make. I cannot write in the header file:

EXPORTIMPORTAPI static Notification_db *notification_db;

as it reports ‘error C2201: must have external linkage’.