|
Thanks for reply....
it means oracle must be install in local machine.
There is any more connection string to connect with server machine.
|
|
|
|
|
get your Oracle DBA to give you the correct tnsnames.ora settings for the server DB instance - say he gives it to you and its 'dbprod1' - paste the settings into your tnsnames.ora, then replace 'orc1' in Data Source=orcl with, for example, dbprod1, so you get Data Source=dbprod1 as the end part of ie
CString Connectionp="Provider=OraOLEDB.Oracle;PLSQLRSet=1;Data Source=dbprod1";
'g'
|
|
|
|
|
|
I am way new to cryptography. I have figured out how to decrypt an mpeg file. I now need to authenticate the images. I have a certificate embedded in the decrypted image file along with an "R" and "S". What are the steps to pull the "P" (prime) out of the embedded certificate and verify the signature? I'm on a windows xp sp3 platform using Visual Studio 2008 sp1.
Thanks.
|
|
|
|
|
|
Thanks for the reply. I was able to get as far as I can by using MSDN Cryptography pages. So far I havent been able to find specific instructions/examples for authenticating the images of a decrypted file.
|
|
|
|
|
Hi All
How can i get url monitor?If url open in Internet explorer or mozilla etc i want to make log file of open url.
|
|
|
|
|
Don't you like the browser's history feature?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
yes i think it's solve my problem.how can i get browser's history?
|
|
|
|
|
It is browser-dependent. A quick search gave me the follow pages for Firefox and Internet Explorer [^], [^]. There's also the CodeProject's article: "Access Internet Explorer's History in MFC".
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
How to get hard disk size, partition size and partition start position in
disk through windows API or using win ioctl code
I tried to use SetFilePointerEx on winxp but got compile error(unrecognized function)
|
|
|
|
|
|
As suggested above DeviceIOControl is needed.
In addition to that if you want to get the partition size and partition start position
you have to call IOCTL_DISK_GET_DRIVE_LAYOUT_EX([^]) as device control code then you will get the partition data.
It has structure DRIVE_LAYOUT_INFORMATION_EX([^]), which will give the required data.
Величие не Бога может быть недооценена.
modified on Thursday, February 4, 2010 1:33 AM
|
|
|
|
|
Thanks
IOCTL_DISK_GET_DRIVE_LAYOUT gives geometry of partition (size, starting offset in disk, type etc).
How to get disk(PHYSICALDRIVE0,1..) size.
|
|
|
|
|
MKC002 wrote: How to get disk(PHYSICALDRIVE0,1..) size.
Follow the link I provided and check out some of the other commands.
MVP 2010 - are they mad?
|
|
|
|
|
|
Thanks
GetDiskFreeSpace gives geometry of partition (total cluster,sector per cluster, sector size and free cluster).
How to get disk(PHYSICALDRIVE0,1..) size. I think GetDiskFreeSpace will not work for it
|
|
|
|
|
Writing Object Succeeds with the following code
#include <iostream>
#include <fstream>
using namespace std;
class Data
{
public:
string name;
int id;
public:
Data(){}
Data(string n,int id){name=n;this->id=id;}
};
int main() {
Data objdata("sujan dhakal",1);
fstream file("c:\\test.txt",ios::out | ios::binary);
if(file.is_open())
{
file.write((char*)&objdata,sizeof(Data));
cout<<"Success";
file.close();
}
else
{
cout<<"Error";
}
return 0;
}
but why reading not working
#include <iostream>
#include <fstream>
using namespace std;
class Data
{
public:
string name;
int id;
public:
Data(){}
Data(string n,int id){name=n;this->id=id;}
};
int main() {
Data objdata;
fstream file("c:\\test.txt",ios::in | ios::binary);
if(file.is_open())
{
file.read((char*)&objdata,sizeof(Data));
cout<<objdata.name<<objdata.id<<endl;
cout<<"Success";
file.close();
}
else
{
cout<<"Error";
}
return 0;
}
help me
|
|
|
|
|
I suggest you read this series of articles[^]. They are about serrialization, this is what you need to do in order to save/load objects.
|
|
|
|
|
i'm writing a simple program using Ansi C++. I'm not using Microsoft C++. that doesnot applies to me. what's your suggestion?
|
|
|
|
|
You cannot do that.
You're trying to serialize an object (see "Serialization" topic at Wikipedia [^]) in a wrong way.
Since std::string is not a scalar type, the object instance (objdata ) holds just a reference to it (and you're saving just such a reference, i.e. storing an address to disk, clearly it makes no sense).
So you cannot save the class as a whole using
file.write((char*)&objdata,sizeof(Data));
instead you have to store each of its members in order to restore appropriately them, for instance:
file.write((char*)&(objdata.id),sizeof(objdata.id));
string::size_type len = objdata.name.length();
file.write((char*) &len, sizeof(len));
file.write((char*)(objdata.name.c_str(), len);
Can you spot the code for reading back the class?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
so it was only the issue of std::string class, thanks i succeed with the following code.
#include <iostream>
#include <fstream>
#include <cstring>
using namespace std;
class Data
{
public:
char name[20];
int id;
public:
Data(){}
Data(char *n,int id){strcpy(name,n);this->id=id;}
};
int main() {
Data objdata;
fstream file("c:\\test.txt",ios::in | ios::binary);
if(file.is_open())
{
file.read((char*)&objdata,sizeof(Data));
cout<<objdata.name<<objdata.id;
cout<<"Success";
file.close();
}
else
{
cout<<"Error";
}
return 0;
}
|
|
|
|
|
Hi All,
I need to pass data from my program to an active notepad window. I got the handle to notepad and copied the data to clipboard but nothing is getting pasted in notepad window after sending WM_PASTE message to notepad window. Here is the code
if(!OpenClipboard(hWnd))
errorExit();
HGLOBAL clipbuffer;
char * buffer;
EmptyClipboard();
clipbuffer = GlobalAlloc(GMEM_DDESHARE, extractedTime.GetLength()+1);
buffer = (char*)GlobalLock(clipbuffer);
strcpy(buffer, LPCSTR(extractedTime));
GlobalUnlock(clipbuffer);
SetClipboardData(CF_TEXT,clipbuffer);
if(notepadWnd != NULL)
{
SendMessage(notepadWnd, WM_PASTE, 0, 0);
}
CloseClipboard();
I used this article as reference. Any pointers what am I doing wrong?
Thanks
|
|
|
|
|
I don't know the answer to your question, but I can break it into two parts:
1/ Am I putting my text successfully on the clipboard...
2/ Is notepad getting my WM_PASTE message?
You can check (1) yourself... Just run notepad, and use the Edit | Paste menu. If that doesn't work, then your clipboard code is wrong.
If you can manually paste into notepad, then maybe notepad does not respond to WM_PASTE, or maybe you are sending the message to the wrong window.
Using Spy++, I get three windows making up notepad - the app window, a child Edit window, and a child status bar.
Maybe you are sending WM_PASTE to the app window, not the child edit one?
Another thing to consider... Notepad could be different on different OS's...
Good luck,
Iain.
I have now moved to Sweden for love (awwww).
|
|
|
|
|
lazy_panther wrote: Any pointers what am I doing wrong?
Sure; you're assuming way too much. For instance, what makes you think that NotePad's mainframe is going to respond to a WM_PASTE message in just the way you want?
Why do you need to paste text to an open NotePad window, anyway? If you need to gather textual input, show a dialog with a text window and collect it that way.
And don't use the clipboard to pass data internally in your program. It's very bad style; suppose, for instance, the user had text already on the clipboard that he'd copied from a browser window with the intention of pasting it later into a Word document. Don't you think that user is going to be a little irritated to find the text he'd placed there is overwritten with something your program did internally, without user consent?
L u n a t i c F r i n g e
|
|
|
|