billqu's Q&A profile
Visual C++ Why UNICODE defined RegSetValueEx() is not working as expected?
Hi All, I wrote a code to update the registry with IP address user has choosen. If UNICODE is not defined then, i could see the IP address updated perfectly at my key value. If UNICODE is defined then i'm seeing squares instead of IP address at the value data. What would be the possible reason and how to avoid this to occur The code snippet i used is: int main(void) { HKEY hKey; char name[] = "199.68.56.33"; RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"SOFTWARE\\MyCompany\\TPS50\\InstallInfo", 0, KEY_ALL_ACCESS, &hKey); RegSetValueEx(hKey, L"FTEBaseIPAddress", 0, REG_SZ, name, (strlen(name)+1)*sizeof(TCHAR) ); RegCloseKey(hKey); return 1; } Best regards, Rajan I ...Show All
Visual C++ CreateCompatibleBitmap failing
On a test Windows XP machine with 5 monitors (Overall desktop bounding box is 3328x2048), I create a bitmap that will span the entire display. Normally this works fine. However, if several applications are open (in particular multiple instances of IE7 on certain web sites), the call to CreateCompatibleBitmap(hdc, 3328, 2048) fails and returns NULL. GetLastError in this case returns 0 (NoError). Is there a limit to the total amount of bitmap space that the system can allocate Is it normal for CreateCompatibleBitmap to fail with no error code Anyone have any ideas on how to work around this, or is there a system setting that can allow more memory to be dedicated to bitmaps I don't think so. I ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Question regarding making landscape in 2D
My question is rather simple. I have a texture and a landscape map to apply it to. It is possible to make a rectangular sprite in XNA, but is it possible to cut a part from it Here's an example for better understanding of what I'm aiming for: http://img335.imageshack.us/img335/9972/examplent7.jpg The only way I can think of is to make a different texture for every sprite, changing its shape every time. But that really it not the easiest and smartest way... You're right, reason why I couldn't just create a texture with transparency is because in my particular case there won't be any predefined shape, they will be changing dynamically. The first 2 options you suggested look interesting, but as you ...Show All
Windows Live Developer Forums Polylines cover pushpins -- can the pushpin be put on top?
How can the pushpin be put on top of the polyline <html> <script src=" http://dev.virtualearth.net/mapcontrol/v3/mapcontrol.js "> </script> <script> var map = null; function GetMap() { map = new VEMap('myMap'); map.LoadMap(); map.HideDashboard(); map.SetZoomLevel(10); } function AddPin() { var pnt = new VELatLong(50, -100); var pin = new VEPushpin('pin1',pnt,null,' ',' ',' ',' ',' '); map.AddPushpin(pin); } function DrawLines() { DrawPoly('Line1',[new VELatLong(50,-99.95),new VELatLong(50,-100.05)], 7, new VEColor(50,200,50,1)); } function DrawPoly(id,points,width,color) { poly = new VEPolyline(id,points); poly.SetWidth(width); poly.SetColor(color); map.AddPolyline(poly); ...Show All
.NET Development Is there a way to Redirect STDOUT/STDERR during AppDomain.ExecuteAssembly like Process.Start's redirection streams
I'm trying to locate the ability to redirect the stdout/stderr within an AppDomain when making calls to the ExecuteAssembly method similar to the ability to do so with Process.Start's RedirectStandardError/ RedirectStandardOutput Thanks, Ty I too am looking for this ability. Or, similarly, any ability to redirect the stdout/stderr of an assembly without having to start a new process, but by running it in the same process either in a separate domain or not. ...Show All
SQL Server Preview has data but no columns returned
In my SSIS package, I connect to an external SQL server database. This external database supports a stored procedure that I need to execute to "retrieve data". So in my package, I set the DataAccess Mode property of my OLEDB datasource to "SQL Command" and I provide the command EXEC <proc_name> <Param>,<output_param>. (The proc has an output parameter). The preview shows all the columns and data, but somehow no columns are returned....so when I try to link this data source to a copy column task, I get an error saying the source does not have any columns...any idea why this could be happening. Thanks - Manmeet yeah I have a similar package connecting to another database (and executing a stored proc ...Show All
SQL Server It's possibel run SSIS in SQL Server 2005 Express Edition
Hy, I wont now if it's possible to run SSIS in my server client that have instaled SQL Server 2005 Express Edition Regards, Filipe Silva ...Show All
Visual Studio 2008 (Pre-release) Web Sync Service using WCF
In the Web Service Sync demo you have to modify the Resource.cs to use the ADO.NET Sync objects. We use Windows communcation foundation and was wondering how this would be done, since I assume the WCF DataContract would be different than the Sync types Are you planning a WCF example in the future Hi Scott, Yes, I am planning for another demo with WCF in the near future. Most likely with the next CTP of sync services. I don't have a date for it though. Thanks ...Show All
Visual Studio Express Editions Audio Volume
Hi, I have another question. Is it possible to display audio input and/or out put levels as seperate channels (Left and Right) I have two of the the VU audiometer ( http://www.codeproject.com/useritems/KEMA_Code.asp ) on my form. one named 'Left' and the other 'Right'. Any help would be great. Nope, It's C#, though it uses quite a bit of DLL calls, so it might look complicated at a first glance. Though, the class basically gives you two static methods. SetVolume which takes an int as its parameter, and GetVolume, which returns an int. So basically you should be able to copy and paste all of the code, and then just use those two methods (aslong as you just want to get or set the volume). I should add that I haven't ...Show All
Visual Studio Tools for Office Batch executing VSTO smarttags action
Hi, I've tried everything I know but keep coming up empty, so if someone can point me in the right direction, that would be great. I have a collection of x-number of VSTO smarttags in a Word document. Each smarttag is the same and has one associated action (which works fine when individually clicked) but the user will have the choice of executing the action individually or in a batch. The action does some Word formatting. The C# code I'd like to use would be something like this: for (int x = 0; x<Globals.ThisDocument.SmartTags.Count; x++) smarttag.get_index(x).SmartTagActions("ActionName").Execute(); So basically, what I'd like is to iterate through the collection of Smarttags contained in the Word do ...Show All
Visual Studio How to install Management studio from Vitual Studio 2005 Professional correctly?
I installed the Vitual Studio 2005 Pro Edition but first I uninstalled all previous express edition. After I installed the pro edition, the Management studio did not get installed Isn't it from the 'wrokstation, ....' option More details: I followed the procedures to uninstall the 'Client Component' 1) Program Control -> Add/Remove Program -> Microsoft SQL Server ->Remove I could be able to remove all compoent except 'Workstation Components' -- After I check the box and press Next -> Finish , the System Configuration check and then done. I went back to 1) and still see the 'Workstation Component' I then selected 'Change' instead of the 'Remove' from 1) -- Select the wrokst ...Show All
Visual C++ Resources Path String
I have embedded an AVI file into my project as a resource. I want it to play it in a Windows Media Player object using the <player>.URL property. How do I supply a url for my example.avi file when it is in my resources folder Thanks. The link was useful (but pretty complicated). But if you do find a way to get a path( as a string ) to the resources directory, I'd like to know. ...Show All
Windows Forms Error installing .Net Framework 2.0 from bootstrap
Hello, This is my first post, so be gentle with me. I have created my first VB VS 2005 project. I have successfully published and can run the project on my machine. I am using ClickOnce FullTrust with .Net Framework 2.0. I have the project signed and the prerequiste of the .Net Framework 2.0 to be installed from the vendor's website. However, when I try to run the setup.exe to install the project on another machine I get the following error in the install.log: The following properties have been set: Property: [AdminUser] = true {boolean} Property: [ProcessorArchitecture] = Intel {string} Property: [VersionNT] = 5.0.4 {version} Running checks for package '.NET Framework 2.0', phase BuildList Error: Unable to locate file 'd' require ...Show All
Smart Device Development SerialPort Component IOException issue
I have a Ipaq Pocket PC. It connects to a bluetooth GPS Receiver (COM6). Whenever I try to open this COM Port using the SerialPort component I get an IOException. I have even tried listing all COM ports on the PPC, and opening each one inturn. Some work and some throw an IOException. Does anyone have a suggestion Hi carda, I was finally able to reproduce the issue on an IPAQ 4350 device. The issue seems to be specific to IPAQ 4150/4350 devices, and does not repro on devices like the IPAQ 6515. Nevertheless, we will consider taking a fix of the issue in the next service pack. Thank you for reporting the issue! Cheers, Anthony Wong [MSFT] ...Show All
Smart Device Development GPRS Connection Setup in Code
Hi, I was wondering if there is a way to configure a connection for GPRS on a windows mobile 5 device in code. I am having a few problems doing it through setting the registry as I can get the connection to appear under the Connections > Manage existing connections dialog but if I try and connect to the connection I am prompted for the username and password however I do not want this prompt to appear. I have been able to do configure the connection with great success for a windows ce 4.2 and pocket pc OS however it seems a little different for the mobile 5 device I am working ok. I do not want to import registry entries, I would like to be able to set the registry values in code, which is working as I get the connection in the required ...Show All
