|
I have a folder which contains an exe, and other files it needs (it was created from a python script using py2exe). Anyway, at the moment the user has to open the folder and click on the exe to run it. I would like to have it where i have a simple installer program which moves the folder to the program fiels directory, and creates a short cut for the exe in the desktop.
How do i do this?
Thankyou.
|
|
|
|
|
Free Setup Utilities
Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
|
|
|
|
|
Hello!!
They are a new customer of the forum is I would want to make a question regarding DAO and ADO. I am work to a plan written in C++ 6,0 using DAO, now I have the necessity to use in same plan ADO. I have unloaded from Internet class ADO2 of Carlos Antollini and inserted in the plan but the two Classes they do not seem to cohabit... Someone to some idea on like using ADO and DAO in the same plan?
Thanks in advance payment.
|
|
|
|
|
When you say they "do not seem to cohabit..", are you getting compilation conflicts?
If that is the case then try this:
<code>
#pragma warning(push)
#pragma warning(disable:4146)
#import "C:\Program Files\Common Files\System\ado\msado15.dll" rename ("EOF","ADOEOF")
using namespace ADODB;
#pragma warning(pop)
#include <afxdao.h>
</code>
I Dream of Absolute Zero
|
|
|
|
|
My stdafx.h is:
#ifndef _AFX_NO_DB_SUPPORT
#include <afxdb.h> // MFC ODBC database classes
#endif // _AFX_NO_DB_SUPPORT
#ifndef _AFX_NO_DAO_SUPPORT
#include <afxdao.h> // MFC DAO database classes
#endif // _AFX_NO_DAO_SUPPORT
#pragma warning(disable:4146)
#import <msado15.dll> rename_namespace("ADODB") rename( "EOF", "EndOfFile" )
#pragma warning (default: 4146)
this work correctly.
My problem rises when it includes the class "Ado2.h" in some .cpp
msjro.tlh(48) : error C2011: 'ReplicaTypeEnum' : 'enum' type redefinition
cl.exe terminated at user request.
This why ADO and DAO use the same enum.....
|
|
|
|
|
MK78 wrote:
msjro.tlh(48) : error C2011: 'ReplicaTypeEnum' : 'enum' type redefinition
Ahh yes, JRO!
There are a host of conflicts between the JRO, ADO and DAO that you will get when you host all of them at once. To solve this, you will need to tinker with their namespaces definition a bit.
Below is the method that I use to resovle this conflict. The code below was used in the stdafx.h file, but your problem is located in the ado2.h file. you may want to modify the file directly, or relocate the importation routine to your stdafx.h file.
<code>]
#pragma warning(push)
#pragma warning(disable:4146)
<font color=green>
#import "C:\Program Files\Common Files\system\ado\msadox.dll"
#import "C:\Program Files\Common Files\System\ado\msado15.dll" rename ("EOF","ADOEOF")
#import "C:\Program Files\Common Files\system\ado\msjro.dll" rename_namespace("JRODB")
#import "C:\Program Files\Common Files\System\Ole DB\oledb32.dll" rename_namespace("oledb")
using namespace ADODB;
#pragma warning(pop)
#include <afxdao.h>
</code>
I Dream of Absolute Zero
|
|
|
|
|
Ok works!
Thanks!
Too many plans make the health badly...
|
|
|
|
|
Hi!
I'm trying to import a dll in Visual C++ 6. Can anybody help me?
When I link to that dll from another project it doesn't work. I'm sure I'm missing something, but I don't know what...
Here's how the dll is written (no errors, no warnings):
**************
* whatever.h *
**************
#ifdef __cplusplus
extern "C"{
#endif
class __declspec(dllexport) MyClass{
private:
char myString[100];
int myInteger;
public:
MyClass();
void getMyString(char * str);
int getMyInteger(void);
void setMyString(char * str);
void setMyInteger(int);
};
__declspec(dllexport) int function(MyClass * mc);
****************
* whatever.cpp *
****************
Just implementation here...
What can I do to import the class and the function from that dll (preferably not using a .def file)??? Please, help me, I'm going mad...
Thank you!!!
|
|
|
|
|
when importing you need to declare __declspec(dllimport)
An often used method when writing dll^s is following:
in the header write a statement like
#ifdef __MY_DLL_PROJECT__
#define _DECSPEC_ __declspec(dllexport)
#else
#define _DECSPEC_ __declspec(dllimport)
#endif
all you need to do is define the symbol _MY_DLL_PROJECT_ in your dll project, and
define your class in the header as:
class _DECSPEC_ MyClass
{
...
};
Greetings,
Davy
|
|
|
|
|
Yeah, thanks...
I had already done that. I nearly kill myself when I realized that I wasn't setting the dependence between both projects. That was all I needed.
Thank you very much for your reply!!!
JaVinci
|
|
|
|
|
Hello all.
Can someone tell me in simple way what happen when I use preprocessor option #pragma pack ? I tryed it but I thing there is no effect.
Can you tell me what exactly happen?
Thank you a lot.
<br />
<br />
#pragma pack(1) // turn byte alignment on ?????<br />
<br />
enum mENUM<br />
{<br />
};<br />
struct p_mStruct<br />
{<br />
UINT m_Ui;<br />
};<br />
<br />
#pragma pack() // turn byte alignment off ?????<br />
Jaja Paja
|
|
|
|
|
Perhaps a simple example is better than any explanation.
First case:
#pragma pack(1)<br />
struct MyStruct<br />
{<br />
BYTE a;<br />
UINT b;<br />
};<br />
#pragma pack()
sizeof(struct MyStruct) will return 5 bytes (1+4=5)
Second case:
#pragma pack(4)<br />
struct MyStruct<br />
{<br />
BYTE a;<br />
UINT b;<br />
};<br />
#pragma pack()
sizeof(struct MyStruct) will now return 8 bytes! (1+3+4=8) because the compiler aligns each member of MyStruct to a 4 bytes boundary. Concretly, the directive tells the compiler that the address of each member must be divisible by 4. To do that, the compiler insert the necessary blank bytes between variable members.
|
|
|
|
|
Ok.
I understand now. Thank you a lot.
xSoptik
|
|
|
|
|
Anyone know if the Ultimate Grid is included in the Ultimate Toolbox? The website has no contact information, and the only way I can see to purchase these products is through codeproject...
Chris Maunder's DataGrid is great, but I just don't have the time to implement slider controls and spin boxes. If anyone knows of good implementations of these, let me know. (The GridTreeCtrl has a spin box cell class in it, but it doesn't seem to work very well without the ability to hold down the spin control, and frequent double-count for a single click of the buttons.)
|
|
|
|
|
I want to a program in vc 6 by using which i can send message say "HELLO" to all the active users on internet.
Can any one guide me or refer me to a good site or refer or provide me some useful links or direct or provide me some source code in vc 6 of the above stated problem.
|
|
|
|
|
|
Well i don't want to develop a Chat type of application.
I want to write an application just containing a "HELLO" message box , which is when activated spreads itself on the internet.
Thats what i mean.
|
|
|
|
|
usmanmir wrote:
which is when activated spreads itself on the internet
You mean like..a virus?
I Dream of Absolute Zero
|
|
|
|
|
Hahahaha... You're stupid. So you want to write a virus right? And you don't have the foggiest idea how to even start. And you ask the question in a forum for people who build software for a job. You really are stupid.
Joel Holdsworth
Wanna give me a job this summer?
Check out my online CV and project history[^] - now available in MSWord format![^]
|
|
|
|
|
Seeing the older posts he made, i guess he is trying to code a worm but using VB
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
actually it's quite simple :
foreach(System.Internet.User usr in System.Internet.AllUsers)
{
usr.System.Windows.Forms.MessageBox.Show("Hello");
}
but maybe you will have som problems porting this C# code to VB
|
|
|
|
|
The. Whole. Entire. Internet. ?.
regards,
Paul Watson
South Africa
PMW Photography
Gary Wheeler wrote:
It's people like you that keep me heading for my big debut on CNN...
|
|
|
|
|
Paul Watson wrote:
The. Whole. Entire. Internet. ?.
Yep, So that he send Morning wish to each Internet user ... Good Morning
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
ThatsAlok wrote:
Yep, So that he send Morning wish to each Internet user ...
Is he aware of time zones ???
Greets
Roland
|
|
|
|
|
That won't work since there are people in different timezones... I don't like to get a goodmornig message before I go to sleep..
Blog[^]
|
|
|
|