ATL COM : Regsvr32 Error

The Module "*.dll" was loaded but the entry-point DllRegisterServer was not found.

Have you saw this error any time, have you google it for the solution, did you found the any help ?

My answer is no.

Here is the solution,
1. check the "def" file is updating properly or not
2. Go to Project properties -> linker -> input -> Add the def file path in Module definition file.

Is you problem solved ? happy to see any comments.


I am using third part DLL to configure something:), I don’t have the code/rights to change that third party dll, and I am getting PInvoke error , when I am importing the dll like below:

[DllImport("XXXXXX.dll")]
public unsafe static extern BusinessObject configure(int iConnectTimeout_seconds, int iReadTimeout_seconds,
char[] sProtocol, object pLoggingStream, char[] sUserAgent, char** sError );


And the error what I was getting is :
“A call to PInvoke function 'sathish!CDLL.Cfunction::export' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature.”

I tried all the possible solution mentioned in the Internet. Unfortunately Nothing is working out for me.

Fortunately
once change the target framework to .NET 4 to .NET 3.5 it start working:)

Is it a Cygwin limitaion ?



Purpose of this link to find/list the method to increase the Virtual memory in cygwin.

Cygwin is handling VM as file system, If host machine allow me to create 4GB file than I should get minimum 4GB VM.

I am not able get this :( I tried a lot and finally I stopped working on that, bec it is impossible :)

I will explain the requirement:

I am running a server on cygwin (on windows 7 , 64 bit , 6 GB RAM ), it used to run fine with Linux environment. Aim of the server is supporting the data access protocol.

When client request for the huge data around one GB from the server it start crashing on cygwin (fine with the linux/windows)
On debugging I found that it is failing at huge memory allocation :
_buf = new char[array_wid]
where array_wid is 1GB. So it is finding difficult to get huge continues memory in cygwin.

In cygwin uses the cygwin1.dll to allocate the memory. Default memory allocation is 384MB. To get the max memory you have set registry entry.

I did that using regtool command,
regtool -i set /HKLM/Software/Cygwin/heap_chunk_in_mb 4096
regtool -i set /HKCU/Software/Cygwin/heap_chunk_in_mb 4096

After this command I am started getting 2GB virtual memory

For more information: http://www.cygwin.com/cygwin-ug-net/setup-maxmem.html

To increase the heap memory I rebuild my solution with
-Wl,--stack,8388608,--large-address-aware,--heap,200000000
.

Still I was getting 2GB VM , I am not able to change that using ulimit –v also

And some link talking about the changing the host machine boot.ini file for extra VM, I tried that as well.

And I am sure that with 32-bit cygwin, I cant achieve this , if any one have 64bit cygwin please share :)

Not able login to windows azure with microsoft credential, not redirecting properly


If you have Microsoft id and you want to login to Microsoft azure, it will take hell lot of time to redirect from the authentication site. Here is the solution : just open one more tab and hit the windows azure, it will work fine. funny but it solves the problem.

Mounting file system permanently in cygwin



Problem:The “mount” command is built for mounting USB devices and the temporary devices, So it will usable for per user session.
If user logout from the user session, you can’t access that mount drive again.

Work around :
Add the mount command on “.bash_profile” file ( available at you home directory)
.bash_profile will execute every session, It is like permanent mount.
RISK: If user run the mount command second time, get the error message that it is already mounted, because that our script may fail.

Solution: creating soft links (shortcuts) instead of mounting
Ie. As we are using the cygwin , “ln –s” command instead of “mount”
The command is: “ln –s x: /usr/local/share/data”

It solved my problem, let me know if you have any other thought :)