Friday, June 19, 2009

Which folders are shared from my computer?

I had one shared folder that had kept me wondering for sometime. I was not able to find it on my disk.
Actually you can see all you shared folders, with their location using 'Computer Management' utility.

1. Right click My Computers
2. Select Manage option.
3. Go to Shared Folders.
4. Then go to Shares.

OR
use Start->Run-> fsmgmt.msc

There you are.

Using this I found that my drives are also shared. This is a problem if someone knows that they can access the computers drives, they can get hold of all your information and data.
I disabled the sharing of drives, using the same utility.

Thursday, June 18, 2009

Dear Norton,
1. Don't block my network and ask me to provide a remote access.
2. For a change, install successfully in one shot.
3. Reimburse the money I pay because of you, for my system's repair.
4. Never, never, never slow down my system boot.
5. Update the software, but don't stop me from working.
6. Make the subscription possible.
7. Provide efficient support, if any. Else declare you have none.
8. You know there are free AV programs available, that are better than you.

Monday, April 13, 2009

Building Pthread static library for VS2005 pthread


In case you're trying to find a way to use pthreads-win32 as a static lib

Build pthread

  1. Get the pthread source code from: http://www.sourceware.org/pthreads-win32/
  2. Define PTW32_STATIC_LIB to build pthreads. 


Be careful to use the same setting for code generation in the lib generation and your project - Debug Multithread DLL (/MDd) or Multithread DLL (/MD).
This will avoid any error with “_errno not found”

Build your application

  1. Define PTW32_STATIC_LIB in your project which will use pthreads (because this define will change the behaviour of pthreads.h file). This will avoid any error msg with “dll implicit…” 
  2.  When pthreads is used as a DLL, the code in dll.c is execute when the dll is loaded. So when using as a static lib, you'll need to call these code also during the initialization and destruction of your process: pthread_win32_process_attach_np(); and for release: pthread_win32_process_detach_np(); This will avoid the crash when you call pthread_create.

Sunday, March 29, 2009

Aaahhh!! Warnings and Errors in Visual Studio.

1. Project : error PRJ0003 : Error spawning 'mt.exe'.
Solution:
Change MSVS 2005 options (Tools menu > Options > Project and Solutions > VC++ Directories) to ensure that
$(SystemRoot)
$(SystemRoot)\System32
$(SystemRoot)\System32\wbem
are specified BEFORE $(PATH).

2. Warning LNK4006: __NULL_IMPORT_DESCRIPTOR already defined in XYZ.lib
Solution:
Don't put any 'Additional dependencies' .libs in your static libraries. Only add them as 'Additional dependencies' to your .exe. If you are using someone elses library that does that, tell them to stop it.

3. warning C4714: function 'XYZ()' marked as __forceinline not inlined
Solution:
http://msdn.microsoft.com/en-us/library/a98sb923.aspx