Hey guys,
I working on a VB.net web application and please let me know how to get the zip code from IP?
Thanks and Regards,
San
User Profile
Collapse
Profile Sidebar
Collapse
SantaClaus
Last Activity: Aug 2 '07, 04:17 AM
Joined: Feb 24 '07
Location: Syracuse
-
Running processes and open ports
HI all,
I want to get the names of all running processes and all ports and their states in C++(Win32). It would be great if you could guide me with some sample code.
Thanks,
SC -
Managed and Unmanaged C++ Interop
Dear All,
I have to include an unmanaged C++ header file in a managed C++ form file "Form1.h" and instantiate objects of unmanaged types. When I include the unmanaged file, I get all kinds of linker errors.
Any Ideas??
Please let me know.
Thanks a lot,
SC -
ifstream::failbit problem
Hi all,
Im getting an exception in the middle of reading a file and here is my code...Code:std::ifstream inf; const int bufSize=1024; char tbuffer[bufSize]; std::string filex = path; // may be C:\test.txt const char* stx = &filex[0]; inf.open(stx,ios_base::in|std::ios::binary); if(!inf.good()) { inf.clear(); inf.close(); std::cout<<std::endl<<"Cant openLast edited by sicarie; Apr 8 '07, 01:44 AM. Reason: Please use [code] and [/code] tags around your code. -
Hi,
Thanks a lot for the reply. Will do that.
Regards,
SC... -
Recusively getting file names
Hi all,
i need to recursively get all the file names in a directory tree in C++. Im using win32 API to get the directory names and recursively calling the same function.
Could anyone please let me know if there is a better way of doing it?
Thanks a lot.
Regards,
SC -
BSTR problem
Hi all,
I'm using a BSTR as an out parameter in a function which reads a file. Here is my code.
HRESULT __stdcall CA::getFile(BST R bstr,BSTR *fileCont)
{
if (!fileCont)
return E_POINTER;
wstring str;
char sz_path[255];
wifstream inFile;
size_t bufsize;
wchar_t* path=bstr;
std::wstring _temp;
bufsize = wcstombs(sz_pat h,path,255);... -
Hi,
I figured out what the problem was. In VC++, the compiler takes the debug directory as the reference. So, I just have to give ../../file.h.
Thanks a lot for your support.
SC...Leave a comment:
-
COM out-of-proc error
Hi all,
I'm not able to compile out-of-proc component. The error I'm getting is
Error 1 error C2259: 'CFile' : cannot instantiate abstract class
I have given implementation for all of the methods in CFile class, which is derived form interface IFile. The createInstance method of CFactory derived from IClassFactory is
HRESULT CFactory::Creat eInstance(IUnkn own *pUnknownOuter, REFIID riid,... -
Hi,
Thanks for the reference. I went through it. I'm giving the fully qualified name of the include file as #include "..\\Test2\\wor k.h"
I guess my problem is with the syntax.
Please let me know if the syntax is right as I couldn't find much help elsewhere.
Thanks again,
SC...Leave a comment:
-
Hi,
Thanks for the reply.
Yes, Test1 and Test2 are in the same parent directory.
mySolution\Test 1
mySolution\Test 2
I have to include files from Test2 in Test1
Thanks again,
SC...Leave a comment:
-
C++ includes problem
Hi all,
I have to include files from different projects in the solution file. I mean I have a temp.cpp in the project Test1 and work.h,work.cpp in the project Test 2 in my visual studio solution.
The structure is -
Test1\temp.cpp
Test2\work.h
Test2\work.cpp
If I have to include work.h in temp.cpp, I'm using the following code
#include "../Test2/work.h"
... -
HI,
Thanks a lot. Its fine now. I had to remove the quotes.
Thanks again.
SC...Leave a comment:
-
-
Hi,
Thanks for the reply. Waiting for anyone to answer me. I put this in this forum as it was more to do with the OleDbDataAdapte r syntax, rather than SQL syntax.
Thanks Again,
SC...Leave a comment:
-
Reading Excel file in VB.NET
Hi all,
I'm reading an excel file in VB.net. It works fine if I don't give any condition in the 'where' claus. My code is
...Code:Dim myDataset As New DataSet() Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\test.xls;Extended Properties=Excel 8.0;" Dim myData As New OleDbDataAdapter("SELECT * FROM [Sheet1$] where t_id='5'", strConn) myData.TableMappings.Add("Table", -
Depth first Search
Hi all,
I'm implementing a depth first search algorithm to determine strong components. If anybody has simple algorithm or sample code, please post it.
Thanks in advance. -
New database from backup
Hi guys,
I have a back up *.bak of a database. Could you please let me know how do I create a new database from this .bak file. I'm using SQL server 2005.
Thanks a lot.
Regards,
santa
No activity results to display
Show More
Leave a comment: