|
i want to write an exe program file,it can run stand alone,and also i want to make it possible that other programs can call functions exposed by the exe,just like call functions exposed by a dll file.
is that possible?
thanks for any reply.
|
|
|
|
|
Yes[^], just make sure to export the desired functions, just as you would do with a dll.
|
|
|
|
|
I have been checking the website to look for articles that explains how to make an instalator of an application coded. I didn't find many info. In one article I found one comment, where two third party programms are named. The "Inno Setup" and the "NSIS2". I would like to know what is your opinion about them (if you know them).
Any other information (like a link to an article that I didn't see, any other tutorial...) that can help me to know about how to do a "MyAppInstall.exe" will be wellcome.
Thank you for your answers.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
See this article http://www.codeproject.com/useritems/NSIS.asp[^]
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
Individuality is fine, as long as we do it together - F. Burns
|
|
|
|
|
My opinion about installers, in general, is that they can be a great waste of your development time. If you have a complex project to install and significant time to invest in creating an installer -- go for NSIS.
I hold the Nullsoft installer in high regard.
But, if you don't have the time and you don't need a fancy installer -- consider something simpler -- there's free commercial stuff out there. I use something called "Advanced Installer" (www.caphyon.com).
They have a free version!
I'd rather spend my limited time coding and debugging than futzing with the installer. And though installer seems like a small thing, trust me you will be investing some time in it.
Like all things in software, once you make a choice, you often have to live with it for a very long time. Choose wisely -- consider what works now and what will work later...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</A>
|
|
|
|
|
hai all,
i want to know, if it is possible to lock a file, such that, nobody can delete it.
why i want this is, for my application, iam using file as the database, where all the user data and other data is available.
i remember that, long back, i used to lock a file from dosmode using ren command. but now iam unable to recall it. can any body remind that logic to me and also if this could be applied to solve my problem?
thanks.
|
|
|
|
|
The C runtime provides a _lock_file[^] function. You might just want to use permissions to deny your users delete authority on the file though. Probably a safer solution.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
thanks for your response.
but what i understood from msdn is, file will be locked for the other processes.
what i want is, i should not be able to delete it from windows.
can you just guide me.
Matthew Faithfull wrote: You might just want to use permissions to deny your users delete authority on the file though
can you just explain me how to do it?
thank you.
|
|
|
|
|
In this regard Windows counts as 'another process'. I have no idea of any DOS locking tricks and I doubt they have carried over to NTFS anyway.
User permission is really a sysadmin thing, you need to look at the accounts and groups of users you have on your system and talk to whoever manages it about how to secure your database against deletion.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
thanks again for your explanation.
now i understood that, my system administrator can do something at my clients place to achieve my task.
but can you confirm that, though the folder or file is locked for deletion, still, my program can update the file?
thank you.
|
|
|
|
|
Yes under modern Windows systems Delete/Create/Read/Write etc permissions are separate, you can allow or any combination to any user or group of users. You might need to specify which user your program runs as depending on the way the site is configured. A program can be launched with the permission sof a specific user and impersonates that user when it comes to getting file access. Your sysadmin could for example create a SpecialDatabaseUser user who has exclusive rights to the database itself and your program could be made to act as that user. There are lots of options and different sites may require different things but I think this approach is the most likely to succeed for deleteion prevention, 'sharing' is of course another issue altogether.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
|
chandu004 wrote: what i want is, i should not be able to delete it from windows.
I personally would be extremely annoyed by a file on my I could not delete.
I would insert considerable energy in *getting* it deleted - up until formatting and reinstall, because I would immediatly suspect either a trojan or SONY and its infamous rootkits behind that.
Tweaking permissions is OK, though. I *COULD* technically get the rights to delete the file, but the file has "Do not delete me!" printed in big red letters on the surface.
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. Douglas Adams, "Dirk Gently's Holistic Detective Agency"
|
|
|
|
|
do you remember how to do a dos lock,
some clues i could recall.
we used something like >ren [filename] [alt+some numbers]
some thing we used to do. but now it is not working.
can you guide me in this regard also.
thank you.
|
|
|
|
|
hi all,
what is the function of CMainFrame::GetActiveFrame() function
thanks
panthal
|
|
|
|
|
|
hi,
yes, what is the function of CFrameWnd::GetActiveView
i got some code from your link, but what does it means,
what is the use of this function
thanks
panthal
|
|
|
|
|
panthal wrote: what is the use of this function
can't you just read the doc ????????
"Call this member function to obtain a pointer to the active multiple document interface (MDI) child window of an MDI frame window.".
So, you use this function only in a context of a Multiple Document application. then, you call GetActiveView() to get the active View. you get it now ?
|
|
|
|
|
I have a complex problem with my C++ application. To explain it better I have made a diagram(UML) which explains the problem better.
http://prasna991.googlepages.com/stuck.gif[^]
Classes are a1,a2,b1,c1 and Rel
b1 inherits a1 and a2
c1 inherits b1
Class a2 holds a pointer to object of type Rel
and has functions setR() and f1()
Class Rel holds a pointer to object of type b1. and has the given constructor which takes a pointer to b1 and update function which takes a void pointer.
CURRENT STATUS :-
Dubugger shows that There is a difference of 4 bytes between memory locations of b1 & tb1 if i put a breakpoint in update function.
eg...
b1 - a0cb0930
tb1 - a0cb0934
or vice versa i think.
|
|
|
|
|
You'll probably need to fix the errors in the UML posted before anyone can really answer this. the '.' operator doesn't work on intrinsic pointers, tb1 needs declaring etc. Some idea of why you want to compare the two pointer values, i.e. what's the goal beyond understanding inheritance would also be useful.
In the end I suspect you're just comparing two different pointers, possibly even by looking at the consecutive addresses where they are stored rather than their values. What you've done isn't really clear enough to be certain though.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
I have corrected the diagram where tmp pointer is used and used actual C++ code now.
Please help me
|
|
|
|
|
Ok there's still an issue with if(tmp==b1) rather than if(tmp==obj_b1) but assuming that is just a typo my bet would be on the multiple inheritance causing an offset between what a2 thinks the value of this is and what a b1 pointer would be pointing at. A couple of things to try, instead of passing a void pointer to update try a a2, try making this a single inheritance hierarchy by deriving a1 form a2 or otherwise.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Hi thank you very much for replying.
I have corrected the problem. (Just inverted the triangles)
What I gave in the UML Diagram is just a kinda semi-pseudocode...
The program compiles and excecuted with no errors...
I am trying to develop a CAD Application with some complex relationships between the shapes
with GOF Observer - Notify pattern for maintaining the relationships
What I gave there is only the class structure where i have problems.
Please tell me why those two pointers are not holding the same address?
|
|
|
|
|
Firstly just a small correction:
In the program section the first line is as follows
c1 *myc1 = new myc1();
That certainly did not compile.
c1 *myc1 = new c1();
will.
In the method update you have the line:
if(tmp==b1)
did you mean:
if(tmp==obj)
Also why the use of the word function if this is C++?
When you instantiate Rel you cast a c1 pointer to a b1 pointer.
When you call f1();
you pass in a this pointer from within a2 in to the update method in the Rel class.
You then cast that pointer to a b1 pointer and compare to see if they are the same pointer.
If they are you call the success method.
So basically you're casting a c1* to a b1*, no problem there.
and casting an a1* to a b1*
I'm curious, how are you maintaining a pointer to Rel in a2 when Rel contains a pointer to a b1, a subclass of a2?
Cheers
Tom
Philosophy: The art of never getting beyond the concept of life.
Religion: Morality taking credit for the work of luck.
"The object of life is not to be on the side of the majority, but to escape finding oneself in the ranks of the insane."
- Marcus Aurelius
|
|
|
|
|
Ah a multiple inheritance problem. Unless only one of the base classes has data members ( so the others are all interfaces ), it should not be done unless as a last resort.
Together with your Rel method update(void*) you appear to have a design problem. void* is untyped and therefore indicative of design flaws.
No doubt there are one or more bugs that could be fixed, but poor design can manufacture complexity and increase the risk of bugs, difficult bugs.
|
|
|
|