Windows Embedded Student Challenge Chat (April 12, 2005)

Posted: April 20, 2005

Please note: Portions of this transcript have been edited for clarity

Introduction

James Z (Moderator):
Welcome to today’s chat. Our topic today is Windows Embedded Student Challenge Chat.

James Z (Moderator):
We are pleased to welcome our Expert for today’s chat. I will have them introduce themselves now.

Sue Loh [MS] (Expert):
Hi, I'm Sue Loh, a developer on the Windows CE team. I work on system performance, perf tools, and other kernel and file system-related things. I hope we can answer some of your questions today.

ivanjo_ms (Moderator):
Hi I'm Ivan Joseph, Product Manager looking after our academic programs and the contest organizer. I will answer all your questions relating to contest rules, report guidelines, judging and so on.

James Z (Moderator):
Let’s begin the chat. We welcome you to begin submitting your questions for our Experts.

Start of Chat

Sue Loh [MS] (Expert):
Q: Moderator,I can not fully understand the process and the thred,can you help me?
A: What problems are you having? Do you mean you don't understand the difference between processes and threads? Basically a process is some memory plus one or more threads. You create a thread using the CreateThread() API.

Sue Loh [MS] (Expert):
Q: I use CreateFile("COM1:"....) & WriteFile to send data via COM1 to my device, but i can not receive any thing from my device.
A: Most likely your COM port is being used for debug output. You will need to disable that in order to use the COM port yourself. Mike Hall has some step-by-step instructions for that on his blog: https://blogs.msdn.com/mikehall/ You can also test whether the COM port is being used for debug output by connecting something like HyperTerm to it.

Sue Loh [MS] (Expert):
Q: yes,what's the difference between them?
A: You can think of a process as the "owner" of a set of threads. Each process has its own virtual address space, which contains the code for the process and all the DLLs that the process has loaded. Thread stacks, heap allocations and other memory are allocated inside the process' address space. Every process has a "main" thread (eg. the one that runs your main() or WinMain() function), plus you can create additional threads using CreateThread(). Does that help clear up the difference?

ivanjo_ms (Moderator):
While we are answering the technical questions, if anyybody has questions about contest rules, judging, report submission guidelines etc, please let me know. I'll be happy to take them

Sue Loh [MS] (Expert):
Q: How can I get current directory of my application on .net cf
A: Unfortunately I don't know the .NET CF answer for this. I know in native code you can use GetModuleFileName to get the full path to the current .exe, and chop off the .exe name to get the path. In general Windows CE does not expose the concept of a "current directory," but the .NET CF may.

Sue Loh [MS] (Expert):
Q: How can I get current directory of my application on .net cf
A: Oh, I meant to mention, at the very least you can p/invoke the GetModuleFileName API from .NET CF. There may be a better answer that I just don't know, however.

Sue Loh [MS] (Expert):
Q: Is there any equivalent for WM_DEVICECHANGE in CE? if so any links to relevant documentation
A: I believe we do have WM_DEVICECHANGE:https://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceddk5/html/wce50conDeviceInterfaceNotifications.asp

James Z (Moderator):
The current topic is Windows Embedded Student Challenge. .NET Compact Framework and Smart Device Programming will begin in 30 minutes

ivanjo_ms (Moderator):
Q: Ivan, could you manage to get success in arranging for a speech engine..We contacted the scansoft ppl but they were asking for a big amount even for the evaluation version.
A: Can you send me the copies of the emails that you have exchanged? I will then contact them to see if they can give you a free version.

Sue Loh [MS] (Expert):
Q: how can i debug my application using evc4 on the device. and how to set the platform manager to let my evc deploy my app on the device.
A: This should just work through evc4. You should be able to just run your app through evc -- evc should send the app to the device over platman. Does evc give you an error when you do this?

Sue Loh [MS] (Expert):
Q: After adding a file in my OS image, do i need to build the image again? Also, the project remove option is permanently disabled.....help!!!Also, if i want to add any mp3 file, do i need to put in the image?
A: Yes, you need to rebuild the image when you change things like .bib file contents, in order to get a new image with your changes. You can add files to the device directly using ActiveSync or some other connection, without adding them to the image. But the next time you reboot they will probably be gone again. I think you'll have to explain more about the "project remove option" so that I know what you're talking about.

Sue Loh [MS] (Expert):
Q: sir can you explain in detail about threading technique in java
A: Sorry, I think that question is outside the scope of this chat.

davli (Expert):
Q: I have followed the instructions on Mike's blog to open the serial port, but when I finished building an application in evc++, activesync cann't find my device. Is it mean that the serial port is still held by the debugger or else??
A: What kinds of device are you using? Is this PPC?

davli (Expert):
Q: I try to use HyperTerm, but also get nothing. I use the orginal nk.bin, and boot by local nk.bin (640x480..... and i think the com is free on this mode. is there any other reasons?
A: Can you tell me how you load the image. Is it loadcepc?

davli (Expert):
Q: yes, loadcepc /v/l:640x480x32
A: Can you use loadcepc /c:0 ?

Sue Loh [MS] (Expert):
Q: I build a image based on internet app. and when i downloaded and ran it, there is no net adapter in 'network and connection setting'. and if i disable KITL, the image will boot into black screen.
A: What you probably need is the VMINI network adapter, to share the ethernet connection between KITL and the network. https://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcehardware5/html/wce50tskenablingvminivirtualadapter.asp

davli (Expert):
Q: Ok, then any way to detect insertion/removal of mass storage devices?? And if there is, how do i retreive the mount point after insertion
A: the USB Mass Storage driver detected the media automatically. It also mount it automatically if registry setting is correct.

Dac_MS (Expert):
Q: How can I get current directory of my application on .net cf
A:Q: How can I get current directory of my application on .net cf

ivanjo_ms (Moderator):
Q: We have rec'd the eBox 2 days back and we had plans to put in a wireless ethnet card, now i dun think we wiud be able to explore much h/w options. Can we seek some leniency in marking if we use a wired connection?
A: So long as it fits in with your overall project you should be ok.

James Z (Moderator):
The current topic is Windows Embedded Student Challenge. .NET Compact Framework and Smart Device Programming will begin in 15 minutes

davli (Expert):
Q: i have no device by hand. and i use loadcepc /? for help before. there is no /c, it think. what does it mean?
A: it specifies the com port which debug serial used.

Dac_MS (Expert):
Q: How can I get current directory of my application on .net cf
A: You can use the following snippet to get current directory

Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase)+@"\";

davli (Expert):
Q: If I wanna use usb disk on my device, what should i add to my project using PB
A: I think you should add USB Host Controller and Mass Storage.

ivanjo_ms (Moderator):
Q: No, it's not PPC, it's ebox.
A: We'll be ending the chat at 9:55 today so we'll try to answer the unanswered questions separately

davli (Expert):
Q: so, /c:0 disabled the com port for debug?
A: I think so.

davli (Expert):
Q: thx, davli
A: You are welcome

Sue Loh [MS] (Expert):
Q: i do not need VM device, i wanna use the real realtek 8139 card. i am sure that i add realtek 8139 driver into the project
A: I don't know the ebox hardware very well, but I assume you have only one ethernet adapter, right? Do you want to use KITL with the adapter, or not? If you are going to use KITL, then to also use the ethernet adapter for network access, you HAVE to use VMINI to share between the two. If you don't want to use KITL, then you should be able to turn off KITL and get it to work. Which problem do you want to debug, the inability to use KITL + network, or the inability to disable KITL?

Sue Loh [MS] (Expert):
Q: Is there a means to detect the insertion of a USB Mass Storage device, as well as detect its mount point within eMbedded C++ (for the eBox)?
A: I think you can use FindFirst/FindNextChangeNotification in the root directory, but I'm trying to find out if there's a better answer. That's not mass storage specific.

russellk_MS (Expert):
Q: Is there a way to run a program thorough another C# program, having the child application return data to the application that ran it?
A: On the desktop, it looks like you would use System.Diagnostics.Process, but .Net CF doesn't seem to support that. Sorry.

James Z (Moderator):
The experts are answering the final questions of the Windows Embedded Student Challenge chat.

Sue Loh [MS] (Expert):
Q: Can a C# application run other C# applications as threads within it?
A: No, you can't use a "process" as a "thread." You can create a separate process and wait for it to exit, or you can create a new thread. What exactly are you trying to do with this? Do you have some other program you're trying to invoke from your own program?

davli (Expert):
Q: I wanna disable KITL and use the real realtek 8139? should i just turn off the KITL in project settings?
A: Do you have another ethernet care you want to use as KITL? if yes, you can simply select it by IRQ line.

James Z (Moderator):
The room will transition to the .NET Compact Framework and Smart Device Programming in 5 minutes.

James Z (Moderator):
Thanks all.

Sue Loh [MS] (Expert):
Q: We're using a parent application that will occasionally run external programs, basically we just need to know when the external program is finished running
A: You can WaitForSingleObject on the process handle you get back in the PROCESS_INFORMATION from CreateProcess.

Top of Page Top of Page