Hi guys, am in a MFC project for that i need to notify my client when any data is updated or inserted in my server database. I am using CSocket for server client connections, how can i identify the change and how to notify my client that's my problem.I am beginner in MFC . If you know pls guide me . Thanks in advance ganesh_IT
ganesh_IT
Posts
-
How to identify the change in SQL database using MFC -
CryptoAPI HelpThanks for your help. CryptoAPI is complicated to understand.
-
CryptoAPI HelpHi Niklas, thanks for your help. In my project i need to encrypt my client's publickey and transfer it to server. Server decrypt it and match the client's publickey with server's publickey. But cryptoAPI function uses handle for keys, i don't know how to write public/privatekey in files because in need to transfer keys between client and server. Thanks in advance ganesh_IT
-
CryptoAPI HelpHi guys, i am new to cryptoAPI. I have used public/private keys algorithm in .NET. But in MFC i need to do the same thing, i need to generate public and private keys and store them in files. In cryptoAPI all function uses the handle to keys that's why i am confused how to generate keys, store in files, and how to use them for encryption and decryption. some one tell me how can i achieve this... Thanks in advance ganesh_IT
-
Return TreeNode Control in .NET RemotingHi guys, now am in a remoting project. I need to transfer a TreeNode control using remoting. Is it possible in remoting i don't know, if any one know explain me Thanks in advance ganesh_IT
-
Data Transfer using MAC address [modified]I am trying to do this for a academic project. Why we cant access the link layer. What i need to do for done this project explain me i can achieve this.... Thanks in advance ganesh_IT
-
Data Transfer using MAC address [modified]Hi guys, i try to send data directly to host MAC address(without using IPAdress). I am not a expert in network programming am just a beginner. In my search i found some ideas, that is we can use
"SocketType.Raw"
in socket to achieve this. But i cant understand it. Another thing is i need to acheive this without NDIS Protocol Driver. somebody pls explain me how to do it...is there any class or utility is avilable in .NET. Thanks in advance ganesh_IT
modified on Monday, December 13, 2010 4:53 AM
-
X509Certificate ErrorHi guys, i doing a project in which SSL is used. For SSL transmission X509Certificate is needed for Client and Server authendication.I am creating certificate using makecert tool makecert -r -n "CN = "SampleProject" -sv SDKSamplePrivDeveloper.pvk SampleProject.cer certificate is created sucessfully. But i have an exception in server
sslStream.AuthenticateAsServer(serverCertificate,
false, SslProtocols.Tls, true);[Exception]
An unhandled exception of type 'System.NotSupportedException' occurred in System.dllAdditional information: The server mode SSL must use a certificate with the associated private key.
I dont know what's wrong in certificate.I also provide the privateKey file in certificate Some one tell me the reason ... Thanks in advance
-
Extracting audio from WMVHi guys i need to extract audio from a WMV file. I never try this kind of task before. So any one tell me how can i achieve this in .NET
-
Socket Recieve problemusing (NetworkStrem ns = new NetworkStream(client))
{
using (BinaryReader br = new BinaryReader(File.OpenRead(filepath)))
{
while (sent < file.Length) // sent = 0 initially
{
data = new byte[20];br.Read(data, 0, data.Length); //read 20 byte from file tempData = data; ns.Write(data, 0, data.Length); // sent to client //\*\*\*\*\* Line Number - 12 \*\*\*\*\*\*\* ns.Flush(); ns.Read(data, 0, data.Length); //Error occures here, this read method read the data send by me in \*\*\*\*\* Line Number - 12 \*\*\*\*\*\*\* and also the ack string ok, thats why the while loop became infinite ack = Encoding.ASCII.GetString(data); while (ack != "ok") { ns.Write(tempData, 0, tempData.Length); ns.Flush(); ns.Read(data, 0, data.Length); ack = Encoding.ASCII.GetString(data); } sent += 20; ack = string.Empty; }
}
-
Socket Recieve problemHi guys i try to write a simpale server client appliaction. server transmit the file content to client and recieve an acknowledgment which is a "ok" string. i have some problem in my code.
using (NetworkStrem ns = new NetworkStream(client))
{
using (BinaryReader br = new BinaryReader(File.OpenRead(filepath)))
{
while (sent < file.Length) // sent = 0 initially
{
data = new byte[20];br.Read(data, 0, data.Length); //read 20 byte from file tempData = data; ns.Write(data, 0, data.Length); // sent to client ns.Flush(); ns.Read(data, 0, data.Length); //recieve ack, but its read the previews content sent to the client ack = Encoding.ASCII.GetString(data); while (ack != "ok") { ns.Write(tempData, 0, tempData.Length); ns.Flush(); ns.Read(data, 0, data.Length); ack = Encoding.ASCII.GetString(data); } sent += 20; ack = string.Empty; }
}
what'wrong here i dont know if u know tell me Thanks in advance
-
WebRequest and WebResponseHi guys, i try to write a simple MP3 Downloader using .NET 2.0. I dont know how to use WebRequset and WebResponse classes , some one explain me simple code , How to connect to websites using these classes Thanks in Advance
-
Typed DataSet Grid ViewHi guys, in my project i use typed date set. I store customer image in SQL and I use Grid View to show database informations.But the problem is, size of the grid view row.I want to change the size to view images . Is any one know how to do it?????????
-
Retrive Data from Data SourceHi Guys, In my project i use Typed DataSource. I am new to .NET, i want to filter my data from SOL database. My SQL Table contains StudentName and StudentID. I want to retrive student name using his/her id, but i dont know how to do it...
-
BinaryWriter Problem for ValueTypesHi Guys, i want to write may value type(structure) in binary format, in BinaryWriter class, overloading is available for all CTS primitive types.But no overload for Object type. Is there facility is available for writing my value type....
//My Value Type struct MyData { string _name; string _fathername; string _address; }; using(BinaryWriter bn = new BinaryWriter(File.Open("File Path"), FileMode.OpenOrCreate))) { MyData d; d._name = nameTextbox.Text; d._fathername = fatherTextbox.Text; d._address = addressTextbox.Text; bn.Write(d) // Error }
Thanks in Advance -
CDateTimeCtrlHi Guys, I am using CDateTimeCtrl in my project.I dont know how to get Date, Month and Year Separatly. If you Know explain me with simple code Thanks in Advance
-
Error MessageHi Guys, I am developing a MFC application using Microsoft Visual Studio 2008, i have a strange error, i dont know how to solve it, if any one know pls tell me the reason.. Error 1 general error c101008a: Failed to save the updated manifest to the file ".\Debug\Account Pro.exe.embed.manifest". The parameter is incorrect. mt.exe
-
FrameWIndow Creation ProblemHi guys, I am writing project for bank operation in MFC, before running my application i have to check the username and password. But i have some problem in my code, my main frame window is closed after enter username and password.Any one tell me the reason.....
class CLoginDialog : public CDialog //MyDialog class
{
//Mycode
};///////////////////////Frame class////////////////////
CBankFrameWnd : public CFrameWnd
{
//Mycode
};
/////////////////////////App class////////////////class CBankApp : public CWinApp
{
public:
CBankApp();
~CBankApp();
BOOL InitInstance();
};CBankApp::CBankApp
{
}
CBankApp::~CBankApp()
{
}
BOOL CBankApp::InitInstance()
{
CLoginDialog *pDlg = new CLoginDialog();
m_pMainWnd = pDlg;
if(pDlg->DoModal() == IDOK)
{
//Verify userName password,
if Valid User then assign frame window in m_pMainwnd and return TRUE ...
CBankFrameWnd *pWnd = new CBankFrameWnd();
m_pMainWnd = pWnd;
pWnd -> ShowWindow(m_nCmdShow);
pWnd -> UpdateWindow();
return TRUE;
}
else
return FALSE;
}Thanks in Advance
-
Binary file problemHi guys, i try to write my data into a binary file, but j have some problem in it . I dont know what happening inside..
//////////////////////Here is my code/////////////////////////////
class Person{
char Name[50];
char Address[10;
bool sex;
short age;
public:
Person();
Person(char* name, char *address, bool sex, short age);
const char* GetName() const;
const char* GetAddress() const;
};
ostream& operator<<(ostream& out, const Person&p)
{
out.write(reinterpret_cast<const char*>(&ap), sizeof(p));
return out;
}
istream& operator>>(istream& in, Person &p)
{
in.read(reinterpret_cast<char*>(&p), sizeof(p));
return in;
}
//Person detail reading and writing is performed well//////////////////AccountProperty Class///////////////////////////////
class Account_Property{
int account_number;
double amount;
bool account_type;
Person p;
public:
Account_Property();
Account_Property(Person p, int ac_num, bool ac_type, double amt);
int GetAccountNumber()const;
double GetAmount()const;
};
ostream &operator<<(ostream &out, const Account_Property &ap)
{
out.write(reinterpret_cast<const char*>(&ap), sizeof(ap));
return out;
}
istream& operator>>(istream &in, Account_Property &ap)
{
in.read(reinterpret_cast<char*>(&ap), sizeof(ap));
return in;
}
//Account_Property readin writing is not performed perfectly ,whats the reason some one explain me.....Thanks in Advance
-
Serializationwhat is data Serialization in MFC framework