|
I created a class cxmlarchive inherited from CArchive, and Iam overriding most of the functionalities of CArchive. in the extraction and insertion operators, i am writing and reading from xml. Is there a problem with that?
When I write into xml, i use WriteString, but when Iam reading it back, I am not sure how I can do it. Can u help me with that?
|
|
|
|
|
Hello
i'm starting a project with a friend who work with delphi 7, and i don't know how difficult could it be to mix two languages; we decided to use dlls and a semi plugin framework to work, but for example: the way delphi data access is (at least for me) too much diferent; can i make classes in C++/MFC and use in delphi or viceversa?, could i make controls in delphi to use with C++/MFC?, etc.
Thanks in advance, i'll appreciate all your comments on this.
|
|
|
|
|
Hello,
Functions in C++ use the calling convention _cdecl (stack cleanup by caller) you should import those functions in Delphi specifing that calling convention.
For the Delphi functions, you should specify (in C++) the WINAPI calling convention (since the PASCAL calling convention is no longer supported in windows.h) when importing those functions.
From here you should know how to interface the 2 languages...
Hope this is of any help.
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
|
|
|
|
|
i have just only can found this
#include "win31.h"
#include "win95.h"
#include "evenmore.h"
#include "oldstuff.h"
#include "billrulz.h"
#define INSTALL = HARD
char make_prog_look_big[1600000];
void main()
{
while(!CRASHED)
{
display_copyright_message();
display_bill_rules_message();
do_nothing_loop();
if (first_time_installation)
{
make_50_megabyte_swapfile();
do_nothing_loop();
totally_screw_up_HPFS_file_system();
search_and_destroy_the_rest_of_OS/2();
hang_system();
}
write_something(anything);
display_copyright_message();
do_nothing_loop();
do_some_stuff();
if (still_not_crashed)
{
display_copyright_message();
do_nothing_loop();
basically_run_windows_3.1();
do_nothing_loop();
do_nothing_loop();
do_nothing_loop();
}
}
if (detect_cache())
disable_cache();
if (fast_cpu())
{
set_wait_states(lots);
set_mouse(speed, very_slow);
set_mouse(action, jumpy);
set_mouse(reaction, sometimes);
}
/* printf("Welcome to Windows 3.11"); */
/* printf("Welcome to Windows 95"); */
printf("Welcome to Windows 98");
if (system_ok())
{
bsod(random_err());
crash(to_dos_prompt);
}
else
system_memory = open("a:\swp0001.swp", O_CREATE);
while(something)
{
sleep(5);
get_user_input();
sleep(5);
act_on_user_input();
sleep(5);
}
create_general_protection_fault();
}
plz help , my teacher wants me to look for win98 source , and all i can find is that , so, is it source code of win98 ? and if its, plz tell me somethings about it . thanks
|
|
|
|
|
You have GOT to be kidding
Artificial intelligence is no match for natural
stupidity.
|
|
|
|
|
Oooops! Your teacher wants to crack the code and make a GNU OS Win98, yeah? I think that this code is good enough for him
Robert-Antonio
|
|
|
|
|
the_death wrote:
my teacher wants me to look for win98 source
Yeah right. No teacher would be that stupid, and if they are the should be sacked on the spot.
the_death wrote:
plz tell me somethings about it
It's a joke. A parody. Nothing more. It's been floating around on the net for years with some slight modifications for different Windows versions.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
You can find it right here at CodeProject! Almost all the sample source code at CodeProject will compile on Win98. And WinME, W2K and even XP!
Heck, some of it may even compile under Unix.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hi,
There are some differences in Windows DLL & Unix Shared Lib .so .
Unix supports dangling references, but Windows DLL doesn't.
does anybody know how to handle dangling references?
Regards,
Praks.
|
|
|
|
|
What do you mean by dangling reference? Define that terminology please. Show me an example of what you mean. To me; dangling reference is a situation where dynamically allocated memory or resource is released, and yet other parts of the program still have pointers or handles to the freed resource.
Is that what you mean? Provide an example? How does UNIX support dangling references?
|
|
|
|
|
Hi
Thanks for reply.
Please refer following link for information regarding dangling refernces.
" Windows vs. Unix: Linking dynamic load modules " http://cphoenix.best.vwh.net/winvunix.html
I have written one Application which is attached to one shared memory.
Pointer " dp " points to that shared memory.
Also I have written one DLL which provides some functions. These functions refers shared memory thr' dp ptr.
Since DLL cann't access ' dp ' (though it is Global pointer ) directly , I have written one more function init_dp_dll_ptr in DLL like below.
static void *dp_dll;//This is local ptr of DLL.
__declspec (dllexport) init_dp_dll_ptr (void *dp_ptr)
{
dp_dll = dp_ptr;
}
But when I call init_dp_dll_ptr() from Main Application, I got segmentation fault at line " dp_dll = dp_ptr; "
I am not a VC progrmmer expert. Please let me know what wrong i have done.
Regards,
Praks
|
|
|
|
|
The concept of what you are doing is fine. I'm a little perplexed. I can't find anything on "segmentation fault" in the MSDN library. Here are some tips in case you haven't thought to try this.
I assume dp_dll is a pointer to a data structure or object. I assume you are using visual studio to setup your projects and Dlls. We do something very similar in our application here at work. We have one main MFC application which contains the GUI and many DLLs that contain some other levels of functionality. one of our Dlls, we call CommonDll and this is where set setup any global pointers that need to be available to all. So common utility functions are exported, the same way you have done so. Of course there are other interface functions that allow other Dlls to get a copy of the pointer. If your app is multithreaded, don't forget to use a CriticalSection or mutex to prevent threads from getting the pointer while it is being initialized.
First, check your project properties. Ensure that C/C++ / Code Generation / Struct member alignment is the same for all of your projects. We ran into major run time problems with this.
What kind of DLL have you setup? We seem to be able to do what you are doing (initialize a global pointer with an exported func within a Dll), very easily with an MFC extension Dll. Regular Dlls are different and have some special requirements for setting up your functions. You're function appears to be setup for an extension Dll so hopefully that is how you have set up your Dll. If not, recreate the Dll project as an MFC extension dll. By default, my visual studio .net selects regular dll and then I have to specifically remember to change this while walking through the project creation wizard.
There is plenty of documentation on dlls within the MSDN library if you need more to read. Just search on regular dll or extension dll.
Hope some of that points you in the right direction.
|
|
|
|
|
How can i exit Windows in StandBy
and in Suspend to Disk ?
The ExitWindowsEX didn't have a flag for it !
Thanxs
rajesh
|
|
|
|
|
Narf!
The SetSystemPowerState function suspends the system by shutting power down. Depending on the ForceFlag parameter, the function either suspends operation immediately or requests permission from all applications and device drivers before doing so.
The SetSuspendState function suspends the system by shutting power down. Depending on the Hibernate parameter, the system either enters a suspend (sleep) state or hibernation (S4).
|
|
|
|
|
Please Help!!!!!!
i just cannot Handle any mouse movements on the status area icon that i created using Shell_NotifyIcon
Seejoy Jose
|
|
|
|
|
Hi,
There is an Sample source regarding this on the section "The Taskbar" @ msdn. Have a look @ it.
Sujan
|
|
|
|
|
Dear All,
Platform: Windows 2000
Developed on: MS VC++ 6.
I have a client-server application in which client application communicates with server application via IPC mechanism. Both of the applications are build in Debug mode. I want to debug the communication b/w them.
For instance, client calls an function "ReadString" which communicates with the server to get the string. I need to debug this flow.
For this I am debugging the client by attaching the server process (in VC++ UI goto Build->StartDebug->attach to process )
I have placed the debug points at the server application at the point where the readstring from server gets called. But when i try to do this, it doesnot debug rather shows assembly part. And then I have to stop debugging.
Can somebody tell me the exact procedure to debug the same. Or alternatively what may be the reason for improper debugging. Please suggest.
Thanks and Regards,
Rohit
|
|
|
|
|
Make sure the PDB files are in the same folder as the EXE files.
If they are not, 'symbols' can not be located, and all you get when you break is assembly.
|
|
|
|
|
Hi Friends,
I am creating software for creating fonts. Let me know wheather is there any SDK's for developing fonts for Microsoft Windows.
Thanks & Regards,
Promise
If you have faith in the cause and
the means and in God, the hot
Sun will be cool for you.
|
|
|
|
|
Hi guys,
is it possible to define partial specialisation for a class template that contains nontype parameter? I wrote a simple template example and wanted to do a specialisation for char * type. I couldn't figure out how to do it, any thoughts?
My original template class is below:
template<class kind, int stack_size>
class stack {
private:
int count;
kind data[stack_size];
public:
stack (void) {
count = 0;
}
void push (const kind item);
kind pop (void) {
--count;
return (data[count]);
}
};
With push() member function separately defined.
template<class kind, int stack_size>
inline void stack<kind, stack_size>::push(const kind item)
{
data[count] = item;
++count;
}
Now I tried to specialise the class for char *
template<int stack_size>
class stack<char *, stack_size>
{
private:
int count;
char *data[stack_size];
public:
stack (void) {
count = 0;
}
void push (const char *item);
char *pop (void) {
--count;
return (data[count]);
}
};
<br>
inline void stack<char *, stack_size>::push(const char *item) <---- error
{
data[count] = strdup(item);
++count;
}
The part above wouldn't compile properly. I got a compile error when it hits the push() function definition. It says the stack_size is undeclared identifier.
Thanks.
|
|
|
|
|
The correct syntax for the specialized member of stack::push is as follows:
template<int stack_size>
inline void stack<char*,stack_size>::push(const char* item)
{
...
}
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
Want a Boost forum in Code Project? Vote here[^]!
|
|
|
|
|
Thank you, Joaquín
In addition. You can see that only stack::push() was needed to change for the specialisation. I am wondering if the C++ template standard provides a way to directly make a specialisation towrds member functions, without having to rewrite whole class specialised declaration?
Thanks again.
|
|
|
|
|
No, you can't partially specialize a member function. The language allows you only to fully specialize a member function. For instance, the following is valid:
template<>
inline void stack<char*,1024>::push(char* const)
{
} but I'm afraid this is not what you're after, sorry.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
Want a Boost forum in Code Project? Vote here[^]!
|
|
|
|
|
I'm into new assignment of sending SMS to mobile phones, I'm just a beginner to this, so please advice me in this regard or send a Visual C++ code to do this and the hardware requirements in detail.
my name is junnybol, and i'm from curacao
|
|
|
|
|
Unfortunately, all free C/C++ libraries for mobile communications, that I know, are designed only for particular type and connection. So I'd like to know:
1. What type of mobile do you have (Siemens, Nokia...?)
2. How do you connect to the mobile (serial line, USB, Bluetooth?)
Robert-Antonio
|
|
|
|