|
Re: Accessing GPIO pins: msg#00116windows.ce.devel
On Mon, 28 Nov 2005 07:19:21 -0800 (PST), Tom Convent <conventag@xxxxxxxxx> wrote: > Hello Rob, > I tried matching virtual memery to physical memory, > but virtualcopy function returns 0. > > ------------------------------------------------------------------------------------------------------------------------- > #define BASE 0x40E00000 > #define PAGESIZE 4096 > DWORD *pMemBase; > BOOL bSucess; > pMemBase = (DWORD*) VirtualAlloc(0, PAGESIZE, MEM_COMMIT, > PAGE_READWRITE); > if(pMemBase != NULL) > { > bSucess = VirtualCopy(pMemBase, (void*)(BASE >> 8) , PAGESIZE, > PAGE_READWRITE | PAGE_NOCACHE | PAGE_PHYSICAL); > } > if(bSucess) > { > printf("Virtualcopy returned %d", bSucess); > return TRUE; > } > else > { > printf("Virtualcopy returned %d", bSucess); > return FALSE; > } > > --------------------------------------------------------------------------------------------------------------------------- > I am using evc++ 4.0. After searching on google I got what might be the > error it says "VirtualCopy() is not an exported function in > eVC++ although it is defined in coredll.lib. Platofrm Builder 3.0 has > this function exported. To enable the use of virtualcopy function it > should be defined in .h file as fallows > extern "C" BOOL VirtualCopy(LPVOID dest, LPVOID src, DWORD size, DWORD > flags); > I exactly defined like above in .h file. I only have evc++ as an option > to develop device drivers. > Any help and hints would be greatly helpful for me. I am not able to > figure out why virtualcopy function returns zero ?? > thanks > Tom > Tom, I'm not near a Windows computer or any of my WinCE references. There isn't much more that I can do to help you. Take a look at the bib files for your target. I'd recommend using Platform Builder for driver development and debugging. Try checking to see if there is an update to eVC++. Another possible choice is to take a known good working driver and modify it to do nothing more than point at a different base address or toggle a pin that you can monitor. It shouldn't be this difficult, but that is the nature of WinCE and Windows in general. If you don't have PB, try downloading the 120-day evaluation version and using it. Maybe then you can get things working properly for you. Take Care. Rob! ------------------------ Yahoo! Groups Sponsor --------------------~--> Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/saFolB/TM --------------------------------------------------------------------~-> |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: Re: Getting color using TODAYCOLOR_TITLEBAR_RIGHT: 00116, Kenny Goers |
|---|---|
| Previous by Thread: | Re: Accessing GPIO pinsi: 00116, Tom Convent |
| Next by Thread: | RE: Accessing GPIO pins: 00116, Nicolas Frayer |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |