|
Hello,
My C/C++ skills are minimal but I would like to see if I can somehow compile a working sample to write a multi-level Window shell extension à la 7zip.
I read the article "The Complete Idiot's Guide to Writing Namespace Extensions" from 2001. I was wondering if someone could tell me...
1. If that sample can be compiled as-is or requires some extra work
2. If yes, can it be compiled with a free C/C++ compiler for Windows?
Hopefuly, once I get everything installed and the sample compiled, I can start peeking and poking to see if I can customize it to build my own shell extension.
Thank you.
|
|
|
|
|
fredtheman wrote: My C/C++ skills are minimal There a re lots of articles here[^] and elsewhere on the internet that will help you learn.
fredtheman wrote: but I would like to see if I can somehow compile a working sample to write a multi-level Window shell extension à la 7zip. Given your previous statement I would think that somewhat over ambitious.
What you can do, is get hold of the free Visual C++ Express system[^] and start building your skills and experience.
|
|
|
|
|
Thanks for the links. I'll give it a try and see if I can figure it out.
|
|
|
|
|
Hi,
if I call CWinApp::GetProfileString() for a key that does not exist, it creates one for me.
This is not what I want.
Is there any way to stop this key from being created?
BTW, I read Stuart Konens CRegistry class article, but cannot use that as third party code is not allowed in my current project.
Thanks,
Bryan.
|
|
|
|
|
The best way would be not to use GetProfileString() but instead use the Registry Functions[^] directly. That way you can check first if the key exists and only create it when necessary.
|
|
|
|
|
Thanks, but...I decided to keep the CWinapp functions as-is.
I just check after the GetProfileString() and if the key has a dummy value, I just delete it.
Works for me.
|
|
|
|
|
We have migrated our application which was written in VC 6.0 to VS2010.
The application crashes on launching it.
The crash occurs at ProcessShellCommand( ). On debugging got this error
"Unhandled exception at 0x7575d36f in MyApp.exe: Microsoft c++ exception CInvalidArgException at memory location 0x0012fb98"
What could be the problem and possible fix for this.
Thanks in Advance.
|
|
|
|
|
V K 2 wrote: What could be the problem
The problem is that you are trying to use an arguement that the function will not accept.
V K 2 wrote: possible fix for this
One possible fix is to use an argement that the function will accept.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
modified 11-Jul-12 9:36am.
|
|
|
|
|
Sheer poetry.
|
|
|
|
|
We can but try....
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
V K 2 wrote: The crash occurs at ProcessShellCommand( ).
Which is called how?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
CCommandLineInfo cmdInfo;
ParseCommandLine( cmdInfo );
// Dispatch commands specified on the command line
if( !ProcessShellCommand( cmdInfo ) )
return FALSE;
|
|
|
|
|
Have you stepped into ProcessShellCommand() (to find the statement that is throwing the exception)?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
It crashes at EnterCriticalSection in below function of C:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\src\mfc\afxcrit.cpp
void AFXAPI AfxLockGlobals(int nLockType)
{
----
----
// lock specific resource
EnterCriticalSection(&_afxResourceLock[nLockType]);
-----
}
|
|
|
|
|
V K 2 wrote: What could be the problem and possible fix for this.
A bug in your code probably caused by the migration itself.
Keep in mind also that although the crash originates from that call that doesn't not insure that the cause is specifically there. Pointer bugs can cause problems long after the problem code was executed.
|
|
|
|
|
hi all,
GetShortPathName function provide a short path name of a specipied file that is exist.
i want to get short file name or short path name before file creation please help me how can i do this?
thanks in advance.
|
|
|
|
|
You can't do that because the short pathname is generated when you create the file. That function could at most predict what the short name will be. GetShortPathName() reads that info from disk.
|
|
|
|
|
so what can i do to create a file with short name?
|
|
|
|
|
Don't know what is the actual problem you wanna solve.
|
|
|
|
|
Don't use more than 8 characters for the name and 3 for the extension.
|
|
|
|
|
Great wisdom speaks, I didn't see the tree from the forest.
|
|
|
|
|
pasztorpisti wrote: Great wisdom speaks
Not really, I was being facetious.
|
|
|
|
|
Le@rner wrote: i want to get short file name or short path name before file creation please help me how can i do this? Are you looking for GetTempFileName() ?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
DavidCrow wrote: Are you looking for GetTempFileName() ?
How would one use that to produce a file name based on a long file name? That is what the OP is asking.
|
|
|
|
|
jschell wrote: How would one use that to produce a file name based on a long file name? That is what the OP is asking. Since he is already using GetShortPathName() to produce a short file name based on a long file name, I'm not real sure what he is asking.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|