Sreekk's Q&A profile
Visual C++ What is the function that returns the integer code of ASCII
Dear All, Any one can remind me with the win32 C++ function that convert the ASCII symbole to its equivalent integer code of the ASCII table Regards Bassam Yes, You don't need to have two unsigned typecasts.I just inserted my chunk of code in ur code. Casting the character to unsigned char is must according to the requirement here.Since the signed short range covers the range of unsigned char , casting to unsigned short is not required. static_cast < short > typecast is returning a signed representation. It's the type mentioned , matters , i guess. I have previously used these cast operators against pointers and ofcourse never against primitive data types. I am very much ...Show All
Smart Device Development bluetooth vs wired
This is wierd. Whenever I create a smart device project, it can connect to the PC via bluetooth or wired (when I create a Server/Client app) This is all fine. The whole point on my application for the smart device is to be able to connect to the Server without wires, ActiveSync becoming our connection. I tested my application for a while now, and the last 2 hours constantly with wired connection (USB). images show fine. as soon as I connect via bluetooth and view an image (being transferred from Server) I hit problems - images will not be recieved/written properly. as soon as I connect back to USB - bam, everything is great. bluetooth - it ain't having it. Wifi: mixed (usb and blu ...Show All
Smart Device Development DataGrid with Decimal values: Not showing correctly
Hi to everyone, I'm a .Net (& CF) newbie. I'm having problems with a datagrid bound to a collection of BindingList<Product>. Product has one decimal property type which doesn't get displayed correctly once I deploy the application to the device. The things works correctly if run in the emulator. I've modified the format property of the column holding the decimal value, and set it to "N2". This brought no luck. Also tried to set a new culture info, still no luck. The value of "0.52" is displayed as "52.00" on the device, while in the emulator is displayed as "0.52". What am I missing Thanks for you help As you already know it has nothing to do with DataGri ...Show All
Windows Forms How to set a C # form never be focused?
Hello all, Here comes a C# Form focus controlling question. I write a C# program that only contains a form and will attach to a general process when I execute it, (e.g.: Notepad.exe) Now, the C# form can display successfully without stealing the focus from the Notepad process, i.e. show-no-activate, by using [DllImport( "user32.dll" ) ] and call the SetWindowPos as follows: {{{ SetWindowPos( handle, (IntPtr) HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_SHOWWINDOW ); form.Visible = true; }}} My planned next step is to prevent the C# form from getting the focus when I click on it. That is, it is hoped that the focus should be always on the attached application such as Notepad. Does anyone know how to do ...Show All
Visual Studio Express Editions How to run an embedded application
I would like to build an application that installs other applications. I have figured the following out: System.Diagnostics.Process.Start(System.Environment.GetEnvironmentVariable("temp") + "\theapp.exe /quiet") The problems I am having is actaully embeding theapp.exe into the setup.exe. It requires the folder WindowsApplication1_1_0_0_0 to be present, I want a single bundled application. I know there are packaging applications for doing that, but cannot find any that are free. Any help if you want to pass args to the process then you need to use the startinfoclass of the process: Dim p As New Process Dim si As New ProcessStartInfo si . File ...Show All
Visual Studio 2008 (Pre-release) Parameters are added to WCF method when using "Add Web Reference"
I have built a WCF service that is hosted on IIS. I have added the WebService & WebMethod attributes to allow older clients (framework 1.1) to connect to this service (it doesn't work without these). I can connect fine, but when I go to call my method there are additional parameters added for all date and numeric parameters. For example, if a method looks like this: Function HelloWorld(sName as String, dDate as Date), when I go to call this function from the client the function definition looks like this: Function HelloWorld(sName as String, dDate as Date, dDateSpecified as Boolean). What's up with this Why is it adding parameters to my methods Any enlightenment on this issue would be greatly appreciated. Thanks in advance, J ...Show All
.NET Development creation of dynamic array
hi I will explain first situation. i have to pass sql parameters to stored procedure , so i have to create a array. sql parameters vary like some time they 5 or 6 some other times they are more. in this situation i want to create dynamic array. so any body can help me for this. with a sample code. thanks, suryany I use code like the following and pass the BasketXml as NVARCHAR: DECLARE @BasketXml NVARCHAR(4000) SET @BasketXml = N'<b><i p="0031020705P0705PUB06" q="3"/> <i p="00111U0606P0615PUB00" q="3"/> <i p="0034100605P0605PUB01" q="2"/></b>' DECLARE @BasketXmlDoc INT EXEC sp_xml_preparedocu ...Show All
Visual Basic How To Find Your EXE
Well, where is it After publishing to CD, and installing it to *******, All I found was a program reference or shortcut link and that was it. Before with ***, you got an actual exe you could play with. And I don't like the link at all. Could it be that .Net programs are just a bunch of scripts to run on .Net Thanks for any help. * off topic item Sounds like you asked for a Click-Once deployment, start reading here ... ...Show All
Visual Studio Team System Really Delete from Source Control
Ok, I've read all the old threads and I still don't get it. How do I completely delete a TFS project including all the related artifacts in source control I've already tried tfsdeleteproject.exe /force /server:servername "team project name" and it "seems" to work but I still see the project in the source control explorer. Jeff Lynch MVP - Commerce Server We understand that HD space is a concern for some customers, e.g. game developers who checkin lots of binaries. Destroy will be supported in the future. ...Show All
SQL Server SQL Service Broker vs MSMQ
I'm in the process of doing the initial research for the architecture of a large scale, transactional messages routing platform. My initial design called for a series of MSMQ queues and Windows Services, written in C#, to process the messages in these queues. There will be incoming and outgoing queues, queues to store unroutable messages, etc. My application will be routing many hundreds of thousands (and eventually millions) of messages per day. These message are very small (< 200 bytes each) and must be routed very quickly. (<1 second processing overhead per message for high priority messages.) Using the term "routing" may be a bit misleading. The messages arrive via TCP socket connections. I will just need to take in a ...Show All
Visual Studio Express Editions system load error
what does the warning " could not load type" system byte" from assembly mscorlib , i must have done something, now i have lots of these things. 'what has gone wrong please. they all seem to be pointing to a warning to do with the font changes i made, but i cant get back to the properties box to change anything. i have 3 forms, and 3 textboxs+ 3 labels. all with the same kind of warning. i have no errors in the program you all look at it but no responses, maybe its tto hard, i sorted the problem out, thanks for all the NONE help. perhaps we should have a forum where the novices get real help ...Show All
Internet Explorer Development IE7's Shrink-to-fit is one size fits all?
Printing in a web app isn't easy. I have an application that loads a page into an Iframe, and a button outside of the iframe that does the iframe.focus();iframe.print() ; thing to print out the contents of the iframe. Whats inside of the iframe is meant to be print out on legal sized paper (8.5"x14"), which isn't the same as normal letter paper (8.5"x11"). In previous IE versions this worked like a charm. IE7, however, decides that legel size is not appropriate and applies the shrink-to-fit to shrink my beautiful legal sized document into a letter sized box. When printing, the printer expects a legal sized document since that's whats defined in the printer settings, but only prints a letter-sized box of content si ...Show All
Visual C++ Isssues with VC 8
Hi all, I have written a simple code in VC 6.0 and this is running well in it. But when i am trying to compile the same code in VC 8 , then i am getting error while compiling , even though the automatic conversion from Vc 6.0 to VC 8 is done. For example in case of a for loop for(int i=0;i<5;i++) ; cout<<i ; // error But in case of Vc 6.0 it runs fine, Why is not automatic conversion of code. Or is there any way to convert 6.0 code to Vc 8.0 automatically, or do i need to change the code manually. Plz sort out my problem. Thanks in advannce Rajesh What error exactly I see two possible errors: i is not defined, cout is not defined. for(int i=0;i<5;i++) ; cout<<i ; ...Show All
SQL Server Multiple records returned.
The following statement gives the error that multiple records are returned. I am attempting to pick one weight out of a group of three, the three have the same ResidentID and different dates in the table variable @WeightReportRaw. If I hard code the ResidentID, ResidentID = 6, it works fine. The variable @intMonth3 passes in a month number ans dosen't seem to be a problem. What am I missing, Thanks in advance for any help. update tblResidentWeightsTemp set FirstWeight = ( select RWeight from @WeightReportRaw as W where ResidentID = W.ResidentID and month (W.RWeightDate) = @intMonth3) I am not quite sure about the background of the calculation but in common you should use the setbased approach (and in addition tr ...Show All
Visual Studio Express Editions How could I pass a string of C# to a BSTR of managed C++ ?
Dear Everyone, I have written a managed C++ program. After building, a dll file will be generated for C# program to use. When I write the managed C++ program, there is a function required a parameter of type BSTR. Example: int generateNumber(BSTR filename){ ............ } However, there is no BSTR data type in C#. How could I pass a string of C# to a BSTR of managed C++ Thank you... Thank you very much. I have tried, it could be compile witout error finally, but there is run-time errors as follow, how to fix this errors : Thank you. Unhandled Exception: System.EntryPointNotFoundException: Unable to find an entry point named GrabFrameFromMovie in DLL ManagedFour.dll. at CSharp.Class ...Show All
