|
I have created a hello world webservice using visual Studio 2005 which I would like to consume from a Device Project in the same same solution. I was getting "file not found" message when trying to call the service and so I decided to try and run the webservice from the browser in the emulator.
I am able to access the web service via the emulator's browser but when I try to invoke the hello world service, I get "the page you are looking for cannot be found"
Might any one know what I am missing? Please help
|
|
|
|
|
Same as Normal windows application, Add as web reference.
|
|
|
|
|
Which API is called when open a directory in WinCE ?
I tried to monitor CreateFileW API to find out if it is used for opening a directory but It's not.
HANDLE _CreateFileHook(
LPCTSTR lpFileName,
DWORD dwDesiredAccess,
DWORD dwShareMode,
LPSECURITY_ATTRIBUTES lpSecurityAttributes,
DWORD dwCreationDisposition,
DWORD dwFlagsAndAttributes,
HANDLE hTemplateFile)
{
HANDLE H=INVALID_HANDLE_VALUE;
if (wcsstr(lpFileName,L"My Documents")!=NULL)
{
MessageBox(GetForegroundWindow(),L"???",NULL,MB_OK);
}
else
H=((t_CreateFile*)Old)(lpFileName,dwDesiredAccess,dwShareMode,lpSecurityAttributes,dwCreationDisposition,dwFlagsAndAttributes,hTemplateFile);
return H;
}
When i clicked on My Documents directory,It didn't do anything! But when I opened one file on this directory, the MessageBox appeared.
I don't know which API I must to intercept in this case.( to prevent from opening a directory).
Help me !!!
Thanks !
Nothing Is Impossible !
|
|
|
|
|
Hi,
Have you looked into writing a file system filter as discussed in the Windows CE Team Blog in this posting http://blogs.msdn.com/ce_base/archive/2005/12/01/499052.aspx[^]?
Directories are not opened, but searched. You would have to hook functions such as FindFirstFile et al which are called when an application wants to obtain a list of files within a specified directory.
If you are wanting to "hide" or "remove" a directory. You would need to hook functions such as FindFirstFile to filter out the enteries related to the directory you want to hide. You would also need to hook CreateFile to stop the user being able to open any files within this directory (if they explictly type in a path somewhere).
hope this helps,
Christopher Fairbairn
|
|
|
|
|
Thank you very much,Christopher Fairbairn!
I think that is all I need.
Nothing Is Impossible !
|
|
|
|
|
hi,
can anyone here to tell me, how to copy the text / contents from browser by using C# code under button_click event, in VS. net for smart devices?
please reply urgently, i shall be thankful to them.
|
|
|
|
|
|
How to open a text file in ms-word in readonly mode through programatically.
I have used CreateProcess function to open text file in Word. But not able to open in readonly mode. And the file is opening in new window. I want that to be in the same application window. Can anybody suggest me whether CreateProcess help me to do that for Windows Mobile 6.0 or is there any another way to do that.
Thanks in Advance.
|
|
|
|
|
Every time I open my Application in Pocket PC the application creates new instance inside Programs menu.
Example (MyApplication,MyApplication(1),MyApplication(2), etc).
How can I solve this in that way everytime I open application it should creates only one instance of itself at first time of starting.
Regards
I Love SQL
|
|
|
|
|
I am working on an app that needs to run on both a PC and a CE device. I have stumbled over that fact that opening a Form/Component in the PC project Form Designer to make a change is a bad thing. Several properties are added that do not exist on the Compact Framework. I am wondering if there is an Attribute or some such that would keep the PC Form Designer from adding properties not support on the Compact Framework?
I assume that the answer is to not use the PC Form Designer.
Tanks for your support
Pat O
<a href="http://currentchaos.blogspot.com/">Blog</a>
_ _ _
|
|
|
|
|
am building an application which will run on PocketPC (2003 SE and Mobile 5.0) Devices (barcode scanners) located in different companies who will use my application.
As part of the application, the application will connect to a webservice (which I am also writing) running at the company location (ie, each company has their own IIS WebService).
I am aware of the Dynamic URL setting. Not a problem. However, everything that I am reading talks about establishing the configuration prior to distribution.
The Problem: Each Company will logically setup their web services with a different URL: ie, http://192.168.0.4/webservicename , http://companymachine/webservicename ). In looking for this answer, I have not come up with any discussion about the ability or sample code.
I am looking for VB.NET code which will permit administration to either enter the webservice URL on the PocketPC device or code which will pull in the WebService URL from a file (TXT or XML) on the Pocket PC device.
The thought is if the PocketPC Application can read the URL values from a file, then the PocketPC Application can be distributed globally to different companies and each company is then in the position to provide their unique URL. The alternative is to maintain builds for each company location which would be an insanely inefficient approach.
Michael
|
|
|
|
|
Hi,
I have an issue, while trying to zooming the captured image.
I am using BitBlt method to copy the device context of the window to the memory DC(CDC).
m_MemDc.BitBlt(0, 0, m_iWidth, m_iHeight, pDC, 0, 0, SRCCOPY);
m_memDC is the variable of object CDC
pDC is a pointer variable to object CDC, which contains the window to be zoomed.
Then I am using Stretchblt method to copy the memory DC to the client DC to zoom to the required level
dc.StretchBlt(0, 0, m_iZoomLevel*m_iWidth, m_iZoomLevel*m_iHeight, &m_MemDc,
0, 0, m_iWidth, m_iHeight, RCCOPY);
Instead of copying (zooming) the image to the destination width and height, it draws the image with in the screen size.
Please let me know if I need to change somthing.
Thanks and Regards
Srinivasan
|
|
|
|
|
I've tried getting together a test project to use SSCE but I keep getting the below error when I try declaring an instance of SqlCeConnection. I do have a reference and it is the version specified.
Anyone know of a possible cause or solution?
"The type 'System.Data.Common.DbConnection' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'"
only two letters away from being an asset
|
|
|
|
|
You need to add a reference to System.Data.SqlServerCe.
This statement was never false.
|
|
|
|
|
Give me a little credit here. Already have reference to it.
only two letters away from being an asset
|
|
|
|
|
Well, your sig says it all.
This statement was never false.
|
|
|
|
|
Can anyone tell me the way how can I synchronize my data from Pocket PC to Desktop, and Desktop to Pocket PC.
I Love SQL
|
|
|
|
|
if you have less data (like 500 kb to 1MB)
Using Web Service
if you have more data you can use
1) Remote Data Access
2) Merge Replication
Pavan Pareta
|
|
|
|
|
Hi,
I have created an application for Zooming in Pocket PC using VS 2005
for WM 5.0. It is working fine in the WM5 devices and emultors. The
application worked fine in WM 6 professional emulator also. But When I
deployed it in WM6 device(device still under testing), it did not
work.i.e., it did not zoom. I have used BitBlt and StretchBlt in my
code. Find below the code.
//Create device context
memDc.CreateCompatibleDC(pDC);
//Create bitmap object
bmpScreen.CreateCompatibleBitmap(pDC,iZoomLevel*m_iWidth,iZoomLevel*m_iHeight);
m_hOldBitMap = SelectObject(m_MemDc,m_bmpScreen);
//Stretch the image and paint it on the screen
m_MemDc.BitBlt(0,0,m_iWidth,m_iHeight,pDC,0,0-
m_iCaptionHeight,SRCCOPY);
CPaintDC dc(this);
dc.StretchBlt(0,0,iZoomLevel*m_iWidth,iZoomLevel*m_iHeight, &m_MemDc,
0,0 ,m_iWidth,m_iHeight,SRCCOPY);
Please let me know will there be any difference between emultor and
the device. Also please let me know if StretchBlt is supported in WM
6.
Thanks in advance.
Srini
|
|
|
|
|
Hello all. I have this application written in C++/MFC with Embedded Visual C++ 4. I have this dialog, which is full screen. When I open this window, if I have an application running, say, the calculator, rather than showing this dialog, it displays the calculator, until I click on the dialog. I tried BringWindowToTop and SetWindowPos with &wndTop as first parameter. Does not work.
Any idea will be really appreciated.
Regards,
FG.
|
|
|
|
|
Hi,
I have created a dll project in MFC for smartdevice, by choosing MFC smart device DLL project and i use __declspec( dllexport ) to export the members of a class.
I am not able to get proper debug information while debugging the code.
venkat
|
|
|
|
|
Hi everyone !
Do you know which process and API run when you open a folder in WinCE?
Do you know some API monitor for CE?
Help me !
Thanks !
Nothing Is Impossible !
|
|
|
|
|
I have written a class for operating the SQLCE database with OLE DB, it work perfect on INSERT ,UPTDATE and so on, but when I use 'select' statement to get values from database it doesn’t return values properly even though the GetNextRows method succeeds.
HRESULT hr = NOERROR;
m_pIRowset = NULL;
m_prghRows = &m_rghRows[0];
hr = pICmdText->SetCommandText(DBGUID_SQL, pwszQuery);
if(!FAILED(hr))
{
hr = pICmdText->Execute(NULL, IID_IRowset, NULL, NULL, (IUnknown **)&m_pIRowset);
if (FAILED(hr)){
AfxMessageBox(_T("failed"));
m_pIRowset = NULL;
}
// Get IColumnsInfo interface
hr = m_pIRowset->QueryInterface(IID_IColumnsInfo, (void**)&m_pIColumnsInfo);
if(FAILED(hr)){
AfxMessageBox(_T("failed"));
}
// Get the column metadata m_ulNumCols//m_pDBColumnInfo
hr = m_pIColumnsInfo->GetColumnInfo(&m_ulNumCols, &m_pDBColumnInfo,&m_pStringsBuffer);
if(FAILED(hr) || 0 == m_ulNumCols){
AfxMessageBox(_T("failed"));
}
// Create a DBBINDING array.
m_dwBindingSize = m_ulNumCols;
m_prgBinding = (DBBINDING*)CoTaskMemAlloc(sizeof(DBBINDING)*m_dwBindingSize);
if (NULL == m_prgBinding){
hr = E_OUTOFMEMORY;
AfxMessageBox(_T("Memory allocation failure"));
}
// Set initial offset for binding position
m_dwOffset = 0;
// Prepare structures to create the accessor
UINT lCount;
ULONG dwOrdinal;
for (lCount = 0; lCount< m_ulNumCols; lCount++)
{
dwOrdinal = m_pDBColumnInfo[lCount].iOrdinal;
m_prgBinding[lCount].iOrdinal = dwOrdinal;
m_prgBinding[lCount].dwPart = DBPART_VALUE | DBPART_STATUS | DBPART_LENGTH;
m_prgBinding[lCount].obLength = m_dwOffset;
m_prgBinding[lCount].obStatus = m_prgBinding[lCount].obLength + sizeof(ULONG);
m_prgBinding[lCount].obValue = m_prgBinding[lCount].obStatus + sizeof(DBSTATUS);
m_prgBinding[lCount].wType = m_pDBColumnInfo[lCount].wType;
m_prgBinding[lCount].pTypeInfo = NULL;
m_prgBinding[lCount].pObject = NULL;
m_prgBinding[lCount].pBindExt = NULL;
m_prgBinding[lCount].dwMemOwner = DBMEMOWNER_CLIENTOWNED;
m_prgBinding[lCount].dwFlags = 0;
m_prgBinding[lCount].bPrecision = m_pDBColumnInfo[lCount].bPrecision;
m_prgBinding[lCount].bScale = m_pDBColumnInfo[lCount].bScale;
switch(m_prgBinding[lCount].wType){
case DBTYPE_WSTR:
m_prgBinding[lCount].cbMaxLen = sizeof(WCHAR)*(m_pDBColumnInfo[lCount].ulColumnSize + 1); // Extra buffer for null terminator
break;
default:
m_prgBinding[lCount].cbMaxLen = m_pDBColumnInfo[lCount].ulColumnSize;
break;
}
// Calculate the offset, and properly align it
m_dwOffset = m_prgBinding[lCount].obValue + m_prgBinding[lCount].cbMaxLen;
m_dwOffset = ROUND_UP(m_dwOffset, 8);
}
// Get IAccessor interface
hr = m_pIRowset->QueryInterface(IID_IAccessor, (void**)&m_pIAccessor);
if(FAILED(hr))
{
AfxMessageBox(_T("failed"));
}
// Create the accessor
//
hr = m_pIAccessor->CreateAccessor(DBACCESSOR_ROWDATA, m_dwBindingSize,
m_prgBinding, 0, &m_hAccessor,NULL);
if(FAILED(hr))
{
AfxMessageBox(_T("failed"));
}
// Allocate data buffer.
//
m_pData = (BYTE*)CoTaskMemAlloc(m_dwOffset);
if (NULL == m_pData)
{
hr = E_OUTOFMEMORY;
CString errors;
errors.Format(_T("%d"),m_pDBColumnInfo[2].ulColumnSize);
MessageBox(NULL,errors,NULL,MB_OK);
AfxMessageBox(_T("failed"));
}
// Retrive a row
//
hr = m_pIRowset->GetNextRows(DB_NULL_HCHAPTER, 0, 1, &m_cRowsObtained,&m_prghRows);
if (SUCCEEDED(hr) && hr != DB_S_ENDOFROWSET)
{
// Set data buffer to zero
//
memset(m_pData, 0, m_dwOffset);
// Fetch actual data
hr = m_pIRowset->GetData(m_prghRows[0], m_hAccessor, m_pData);
if (FAILED(hr))
{
m_pIRowset->ReleaseRows(1, m_prghRows, NULL, NULL, NULL);
AfxMessageBox(_T("failed"));
}
}
if (hr == DB_S_ENDOFROWSET)
{
m_bIsEOF = TRUE;
}
}
venkat
|
|
|
|
|
Hi,
I tried to create a SmartDevice MFC application using VS 2005. I have
installed Windows Mobile 6 Professional SDK. I have created an MFC
smartDevice application(Dialog based). When I tried to compile the
application, I am getting an error. #error Must define a target
architecture.
Please let me know how to fix this issue.
Thanks
Sri
|
|
|
|
|
I m jay & I m doin a project for which I required a SMS Gateway. I used NowSMS for sending & recieving SMS through my cell phone connected via USB. But NowSMS cannot read the msgs that I sent to the connected mobile. I hve tried some settings but I m not a Network Specialist, so I dont know some of the settings like SMPP server, POP3, SMSC & other such stuff. Can anybody plz help me in this. Can somebody gve me the general settings for the NowSMS. Plz reply
|
|
|
|
|