Google is your friend, "establish gprs connection": Establish a GPRS connection with TcpClient
Regards, Daniel. -- FIND A JOB YOU LOVE, AND YOU'LL NEVER HAVE TO WORK A DAY OF YOUR LIFE. ;)
Google is your friend, "establish gprs connection": Establish a GPRS connection with TcpClient
Regards, Daniel. -- FIND A JOB YOU LOVE, AND YOU'LL NEVER HAVE TO WORK A DAY OF YOUR LIFE. ;)
Same question: What do you mean with "define our own file type"? You can use any type of file in your own programs (txt-files, binary-files, ...); maybe a good choice is XML (there are very good parsers in the .NET CF).
Regards, Daniel. -- FIND A JOB YOU LOVE, AND YOU'LL NEVER HAVE TO WORK A DAY OF YOUR LIFE. ;)
What do you mean with "can we set gprs connection trough vb or c#"? Do you want to establish a gprs connection with C# or VB.Net?
Regards, Daniel. -- FIND A JOB YOU LOVE, AND YOU'LL NEVER HAVE TO WORK A DAY OF YOUR LIFE. ;)
I would need a function to copy unsigned short values from a IntPtr to a ushort[]-array, but the Marshal.Copy-function only support the short[]-array! At the moment I do it the following way: ... IntPtr pResult; int len; // this function is located in a DLL CanIpuExecCmd(mid, hid, did, data, data.Length, out pResult, out len); short[] tmp = new short[len]; Marshal.Copy(pResult, tmp, 0, len); Marshal.FreeHGlobal(pResult); ushort[] result = new ushort[tmp.Length]; System.Buffer.BlockCopy(tmp, 0, result, 0, len * 2); return result;
Is there no nicer way to do it?
Regards, Daniel. -- FIND A JOB YOU LOVE, AND YOU'LL NEVER HAVE TO WORK A DAY OF YOUR LIFE. ;)
Looks like you forgot to link the Ws2_32.lib with your project! Regards, Daniel. -- FIND A JOB YOU LOVE, AND YOU'LL NEVER HAVE TO WORK A DAY OF YOUR LIFE. ;) -- modified at 23:58 Monday 9th January, 2006
I want to simulate an input and post into a web page and than download the web page that is opened after the correct input! The web page exists of an user input form with userid and password, after input the correct data and pressing the submit button another web page will be opened. I have tried to download the web page with the following code (I am using the CAmHttpSocket class at http://www.codeproject.com/internet/amhttputils.asp): int _tmain(int argc, _TCHAR* argv[]) { CAmHttpSocket http; char* p = "userid=xxx&pwd=xxx"; char* s = http.GetPage( _T("https://orawww.uibk.ac.at/public\_prod/owa/pk205.frame\_lv\_termine\_lzk?termin\_id\_in=3678"), true, p, strlen(p)); int i = http.GetPageStatusCode(); printf("%s\n", s); printf("%d\n", i); return 0; } My problem is that I don't know how to simulate the input and pressing the submit button! How can I pass the userid and the possword? Regards, Daniel. -- FIND A JOB YOU LOVE, AND YOU'LL NEVER HAVE TO WORK A DAY OF YOUR LIFE. ;) -- modified at 4:46 Thursday 15th September, 2005
Hi, I hope someone can help me with the following problem: I have to download several web pages and search for a special number or text in this sites. If the number or the text is found, the adress of the page should be displayed. So, now my problem is that I don't know how to download a page? Does anyone have a sample? The other problem is that before this web pages can be displayed in IE or Firefox you have to enter a username and password! Regards, Daniel. -- FIND A JOB YOU LOVE, AND YOU'LL NEVER HAVE TO WORK A DAY OF YOUR LIFE. ;)
Just give me your e-mail and I will send you a whole C# sample for IrDA communication! Regards, Daniel. -- FIND A JOB YOU LOVE, AND YOU'LL NEVER HAVE TO WORK A DAY OF YOUR LIFE. ;)
Take a look at OpenNETCF. Regards, Daniel. -- FIND A JOB YOU LOVE, AND YOU'LL NEVER HAVE TO WORK A DAY OF YOUR LIFE. ;)
Take a look at C++ Q&A - Get the Main Window, Get EXE Name and Taking a Snapshot and Viewing Processes. I hope this will help you! Regards, Daniel. -- FIND A JOB YOU LOVE, AND YOU'LL NEVER HAVE TO WORK A DAY OF YOUR LIFE. ;)
Why does the application jumps into the catch (B* ex)
and not the catch (D* ex)
? The dynamic type of p
is D
and not B
!
#include "stdafx.h"
class B
{};
class D : public B
{};
int _tmain(int argc, _TCHAR* argv[])
{
try
{
B* p = new D;
throw p;
}
catch (D* ex)
{
delete ex;
printf("catch (D* ex)\n");
}
catch (B* ex)
{
delete ex;
printf("catch (B* ex)\n");
}
return 0;
}
Regards, Daniel. -- FIND A JOB YOU LOVE, AND YOU'LL NEVER HAVE TO WORK A DAY OF YOUR LIFE. ;)
CTime to CString:
CString szChoice;
CTime date;
m_date.GetTime(date);
//szChoice = date.Format(L"%x");
szChoice.Format(L"%02d.%02d.%02d", date.GetDay(), date.GetMonth(), dat.GetYear());
fileRead(L"Date: " + szChoice+ L"\r");
and of course: A Date and Time formatter Regards, Daniel. -- FIND A JOB YOU LOVE, AND YOU'LL NEVER HAVE TO WORK A DAY OF YOUR LIFE. ;)
Take a look at Strings on Pocket PC, Unicode and ANSI.
char* GetAnsiString(const CString &s, UINT nCodePage)
{
int nSize = s.GetLength();
char *pAnsiString = new char[nSize+1];
WideCharToMultiByte(nCodePage, 0, s, nSize+1, pAnsiString, nSize+1, NULL, NULL);
return pAnsiString;
}
CString strUnicode = _T("Some test string");
char *pAnsiString = GetAnsiString(strUnicode, CP_ACP);
Regards, Daniel. -- FIND A JOB YOU LOVE, AND YOU'LL NEVER HAVE TO WORK A DAY OF YOUR LIFE. ;)
I am using the ShellExecuteEx method in some of my Pocket PC applications, so it should be no problem! For more information take a look at: QA: How can I open the default mail or browser program when the user clicks on an URL? PS: The only nice thing about using CreateProcess is that you can wait until the running application is terminated, or for a specified timeout! Regards, Daniel. -- FIND A JOB YOU LOVE, AND YOU'LL NEVER HAVE TO WORK A DAY OF YOUR LIFE. ;)
It look like you have tried to call the SetItemText function of the CListCtrl class with the LVS_OWNERDATA style flag and if you take a look in the source code of winctrl2.cpp, Line 504 you will see an assert:
BOOL CListCtrl::SetItemText(int nItem, int nSubItem, LPCTSTR lpszText)
{
ASSERT(::IsWindow(m_hWnd));
ASSERT((GetStyle() & LVS_OWNERDATA)==0);
LVITEM lvi;
lvi.iSubItem = nSubItem;
lvi.pszText = (LPTSTR) lpszText;
return (BOOL) ::SendMessage(m_hWnd, LVM_SETITEMTEXT, nItem, (LPARAM)&lvi);
}
So, this function call is not allowed with the LVS_OWNERDATA style flag! Regards, Daniel. -- FIND A JOB YOU LOVE, AND YOU'LL NEVER HAVE TO WORK A DAY OF YOUR LIFE. ;)
You will find realy good stuff in the book Programming Microsoft Windows CE .NET, Third Edition. Regards, Daniel. -- FIND A JOB YOU LOVE, AND YOU'LL NEVER HAVE TO WORK A DAY OF YOUR LIFE. ;)
Maybe they are located in the registry?! Just delete it there! Regards, Daniel. -- FIND A JOB YOU LOVE, AND YOU'LL NEVER HAVE TO WORK A DAY OF YOUR LIFE. ;)
Are you shure that the thread started correctly? Just show a message box when the thread is started. Just try to read some data from the COM outside of the thread, to see if the serial communication work! PS: I use the Serial library for C++ library (with some little changes that it will compile under eVC++) for my serial communication! Regards, Daniel. -- FIND A JOB YOU LOVE, AND YOU'LL NEVER HAVE TO WORK A DAY OF YOUR LIFE. ;)
Show us how do you read the data from the COM1 port in your thread! Regards, Daniel. -- FIND A JOB YOU LOVE, AND YOU'LL NEVER HAVE TO WORK A DAY OF YOUR LIFE. ;)
How do you hide/show the toolbars (what kind of functions do you use)? Regards, Daniel. -- FIND A JOB YOU LOVE, AND YOU'LL NEVER HAVE TO WORK A DAY OF YOUR LIFE. ;)