142 Posted Topics
Re: > However when I search for develop the program can not find it. It appears that you may have a logic issue in your searchForVerticalBtoT function Please note that the D in DEVELOP begins at position #5 (Zero based index) But the following code will never execute since SIZE equals … | |
Re: [MetroPandora SDK](http://metropandora.codeplex.com/) can be used to extract song info from Pandora using .Net web services. | |
Re: How about trying a different approach by searching the currently running processes for a specific window title? Process process = null; foreach (Process p in Process.GetProcessesByName("iexplore")) { if (p.MainWindowTitle.Contains("My Test Application")) { break; } } | |
Re: > I Want to Know How To search files that are saved on the Driive ?? For starters, check this [Daniweb thread](http://www.daniweb.com/software-development/csharp/threads/416752/how-can-i-search-a-particular-file-in-the-computer) to search for files. | |
Re: long long y = year + 4800 + a; should be this long long y = year + 4800 - a; | |
Re: > On their website they have the source files so I'm not sure if I have to compile it and put it in the bin folder of my IDE first. If so, where can I get instructions on how to compile zlib? Download the Zlib source code for Zlib version … | |
![]() | Re: Have you tried using [lockbits](http://supercomputingblog.com/graphics/using-lockbits-in-gdi/)? ![]() |
Re: using System; class Program { static void Main() { TimeZoneInfo info = TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time"); string serialized = info.ToSerializedString(); Console.WriteLine("serialized: {0}", serialized); TimeZoneInfo deserialized = TimeZoneInfo.FromSerializedString("Eastern Standard Time;-300;(UTC-05:00) Eastern Time (US & Canada);Eastern Standard Time;Eastern Daylight Time;[01:01:0001;12:31:2006;60;[0;02:00:00;4;1;0;];[0;02:00:00;10;5;0;];][01:01:2007;12:31:9999;60;[0;02:00:00;3;2;0;];[0;02:00:00;11;1;0;];];"); Console.WriteLine("deserialized: {0}", deserialized); } } | |
Re: How about verifying that the Winsock DLL does in fact support 2.2 as indicated below? int nResult = WSAStartup(MAKEWORD(2,2), &wsaa); if(nResult != 0) { return false; } /* Confirm that the WinSock DLL supports 2.2.*/ if (LOBYTE(wsaa.wVersion) != 2 || HIBYTE(wsaa.wVersion) != 2) { /* Tell the user that we … | |
Re: Check out [EasyHook](http://code.google.com/p/easyhook-continuing-detours/). | |
Re: Your server code needs a bind statement to indicate what port its listening to. bind(sockfd,(struct sockaddr *)&serv,sizeof(serv)); | |
Re: It's been a while since I worked with the Win32 API. But if memory serves me correctly, you have to do the following: HDC hdc = GetDC(NULL); DWORD color = GetPixel(hdc, x, y); unsigned int r = GetRValue(color); unsigned int g = GetGValue(color); unsigned int b = GetBValue(color); cout << … | |
Re: I assume this post relate to your other [Daniweb post](http://www.daniweb.com/software-development/csharp/threads/421494/dvr-connection-). So, can you provide the manufacturer's name of this 4 channel usb 2.0 DVR? Also, is a SDK kit provided and do you have any technical specs for this hardware? AFAIK, very few DVR manufacturer's open up their hardware by … | |
Re: Your primary problem is not with the following statement although it should not be typecasted as LPBYTE > ***** hMapFile = (LPBYTE)CreateFileMapping(hFile,NULL,PAGE_READONLY,0,256,NULL);***** The problem is caused by the following statement: > fileView = MapViewOfFile(hMapFile,FILE_MAP_READ,0,0,0); [MapViewOfFile](http://msdn.microsoft.com/en-us/library/windows/desktop/aa366761%28v=vs.85%29.aspx) returns a LPVOID data type. fileView is a LPBYTE data type. | |
Re: Could the problem possibly be that you're using two different paths in your get_source function and the path is WM_CREATE is valid but the path in the case statement IDC_BUTTON_GET is invalid. | |
Re: This syntax error below tells me that you have only an open brace somewhere in your code. That is, there is no corresponding closing brace. But yet I do not see this error condition in your posted code. Are you sure you posted the faulty code? > d:\vc\chap2\sln\tryagn\tryagain.c(4): error C2449: … | |
![]() | Re: Since your OS is windows 7 64bit, ASLR is implemented by default. IMHO, MitrMakr correctly identified the issue. So, with that said, I offer one possible solution. Use the [CreateToolHelp32Snaphot](http://msdn.microsoft.com/en-us/library/windows/desktop/ms682489%28v=vs.85%29.aspx) function to get the base address from the [MODULEENTRY32](http://msdn.microsoft.com/en-us/library/windows/desktop/ms684225%28v=vs.85%29.aspx) structure. At that poiint you can use modbaseAddr structure member as … |
Re: > the link you've given says that the page is unavailable.. :P sorry!! > Unfortunately, Waltp cut off the last character of his posted link. Below is the corrected link [void main](http://www.gidnetwork.com/b-66.html) Also, [here](http://www2.research.att.com/~bs/bs_faq2.html#void-main) is another good link referencing the ISO standards. | |
Re: I'm just not sure the following statement will work with a full path ofstream out("Z:\mp3.txt"); Why don't you try the following... ofstream out("mp3.txt"); | |
Re: Your comparison is somewhat faulty as indicated below; if(name[b-1] [0] > name[b][0]) { // if out of order exchange elements In the above snippet, you're comparing just the first character of each string. You should use a string comparison function such as [strcmp](http://www.cplusplus.com/reference/clibrary/cstring/strcmp/) to compare the full string as in … | |
Re: Well, your code might actually run if you fixed all the syntax errors in the above code. | |
Re: Maybe [this](http://www.codeproject.com/Articles/12673/Calling-Managed-NET-C-COM-Objects-from-Unmanaged-C) CodeProject link can be of some help to you. | |
Re: What make is your DVR? Have you checked with the DVR manufacturer/vendor to determine if a SDK is available for your particular DVR? | |
Re: Kernel mode drivers do not normally export functions. Instead, DriverEntry is responsible to report to user mode, the addresses of functions which need to be exposed to the system, using the DRIVER_OBJECT structure. The IRP_MJ_DEVICE_CONTROL is the IRP used when a usermode program sends an IOCTL to a driver with … | |
Re: > hexDump ("my_str", &my_str, sizeof (my_str)); First of all, what's wrong with the above statement? Specifically, what's wrong with the third input argument? > > if you have a better way include that also IMHO, I believe you should open the input file in binary mode. ifstream myFile(argv[1], ios::in | … | |
Re: Drivers are installed under the Windows OS using INF files. Thus, one possible option would be to develop a console utility that would modify the INF file such as change the appropriate directories etc.prior to implementing the INF file. After you modified your INF file, you would execute Rundll32 in … | |
Re: A sparse matrix has the following appearance: spmatrix[0][0] = total number of rows in sparse matrix spmatrix[0][1] = total number of columns in sparse matrix spmatrix[0][2] = total number of non-zero values index variable must be greater than zero s[index][0] = row value of non-zero value s[index][1] = column value … | |
Re: > `char ReadData[1000000] = {0};` Just an observation. If you are reading a binary file, you should define ReadData as an unsigned char to accomodate binary values from 0 to 255. Otherwise, the ReadFile variable will contain negative values for any binary data over 127. | |
Re: [Here](http://msdn.microsoft.com/en-us/windows/hardware/gg487414) is a MS whitepaper detailing the requirements for Kernel mode interaction with User Mode. That is, how to call Win32 API (FindFirstFile/FindNextFile) from the kernel. The kernel mode functions that are required to implement FindFirstFile/FindNextFile equivalent are as follows: RtlInitUnicodeString NtCreateFile NtCreateEvent NtQueryDirectoryFile NtWaitForSingleObject RtlUnicodeStringToAnsiString NtClose Also, keep in … | |
Re: [Petzold's book](http://www.amazon.com/Applications-Code-Markup-Presentation-Foundation/dp/0735619573) has information on radial panels (pie menus) which is a good starting point. Also, pie menus are sometimes referred to as circular context menus. You'll probably have to use [Windows Presentation Foundation]( http://msdn.microsoft.com/en-us/library/aa663364.aspx) to develop your pie menu. FYI. a pie menu is a circular graphical menu similiar … | |
Re: The link that you provided cannot be accessed.... [www.ryzalyusoff.com](http://www.ryzalyusoff.com) | |
Re: Why not just skip over any folder that the app does not have access to by using a try/catch block? try { s1 = Directory.GetFiles(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "*.*", SearchOption.AllDirect // Do whatever additional processing is needed } catch (UnauthorizedAccessException) { // You will be here when access is denied to folder // … | |
Re: The second parm is from the [MEMORY_BASIC_INFORMATION](http://msdn.microsoft.com/en-us/library/windows/desktop/aa366775%28v=vs.85%29.aspx) structure. You must first call [OpenProcess](http://msdn.microsoft.com/en-us/library/windows/desktop/ms684320%28v=vs.85%29.aspx) and then call [GetSystemInfo](http://msdn.microsoft.com/en-us/library/windows/desktop/ms724381%28v=vs.85%29.aspx) The lpMinimumApplicationAddress is used as an input to [VirtualQueryEx](http://msdn.microsoft.com/en-us/library/windows/desktop/aa366907%28v=vs.85%29.aspx) which returns the Memory_BASIC_INFORMATION structure which is used in your ReadProcessMemory function call. In very simple terms, lpBaseAddress is where the executable loads in … | |
Re: > my string has a path "\1.1.1.1\XYZ", 1....1 being the IP address of the computer am trying to connect to, It appears that your path string may be malformed. Also, you may have to add the hidden adinistrative share name to the path. For example, try either one of the … | |
Re: [Here](http://www.daniweb.com/software-development/csharp/threads/416752/how-can-i-search-a-particular-file-in-the-computer/1#post1779776) is a thread that may be of some interest to you | |
Re: [Here](http://mariusbancila.ro/blog/2007/05/29/file-io-comparison-between-win32-crt-stl-and-mfc/) is a I/O profiling link and [here](http://msdn.microsoft.com/en-us/library/ms810613.aspx) is a link to some info on memory mapping file I/O that may be of interest to you. | |
Re: > i don't know how to access the pcb of the os !! Assuming that you mean Process Control Block (PCB) in a Windows environment. Well, to access the PCB you have to work on the kernel level. So, you'll have to download the [Windows Driver Kit SDK](http://msdn.microsoft.com/en-us/windows/hardware/gg487428) as a … | |
Re: [An introduction to OpenGL GLSL](http://nehe.gamedev.net/article/glsl_an_introduction/25007) | |
Re: Modify your structure to reflect ONLY what you are reading in from the text file. That is, get rid of the variables in the struct that are NOT found in the text file. Next, get rid of the ifstream.read statements. Only use the open and eof functions. In the eof … | |
Re: [QUOTE]My question is what do i have to look for?I only need indications, link, etc.I want to do this by my own. [/QUOTE] Google for Windows Management Instrumentation (WMI) | |
Re: > Basically, I'm trying to make something like an anti-virus and most antivirus tools are practically impossible to shutdown by using CTRL+ALT+DEL combination. The moment one shuts down the process, another instance runs in a way that process never ends, or if a user tries "killing" the process, it says … | |
Re: Here is a quote from the book entitled [C++ Footprint and Performance Optimization](http://www.amazon.com/C-Footprint-Performance-Optimization-Professional/dp/0672319047) > What Is Footprint? > Strictly speaking, footprint is a spatial measurement term. The footprint of a desktop computer, for > example, is about 40´40 centimeters (about 16´16 inches); that is the desk space it occupies. When … | |
Re: What's wrong with the name variable? Specifically, how would you store Donald Duck in that variable? struct records { public: **char name;** int hours; float rate; int age; float basepay; float tax; float netpay; }; > ...using an example from the textbook for struct instead of class but not in … | |
Re: [QUOTE=Rasool Ahmed;1783296]Hi guys, what's up? Is native applications familiar to you? I'm right now building an anti-virus, and as you know the viruses can be active or passive, the passive is easy to remove but the active , well.... it's hard to remove but I finally found the solution is … | |
Re: You shouldn't have any problem using the WidCharToMultiByte function to do this conversion. Post your nonworking code to provide details of the problem. | |
Re: Use a [URL="http://www.cplusplus.com/reference/stl/vector/"]Vector[/URL] as your starting point to calculate the median. Next you want to get the size of the vector. Store the size in a temp variable for later use. Now you want to partition the vector using [URL="http://msdn.microsoft.com/en-us/library/fyf8f0w7%28v=vs.80%29.aspx"]Standard Template Library (STL) nth_element[/URL]. Partition should be midpoint based upon … | |
Re: First of all, the Reverse function is missing in your code. Secondly, you don't need a Reverse function in RPN. The "reverse" in Reverse Polish Notation means that the expression is reversed. For example a normal expression would be 3+4, In RPN the expression would be 3 4 +. You … | |
Re: RPN uses a Last In First Out (LIFO) stack. That is, the last variable pushed on the stack is the first variable popped off the stack. For example, the following expression: 5 4 3 + * Assuming our stack is initially empty. The first item is an operand (5), so … | |
Re: I believe a multithreaded TCP Server which supports asynchronous communications may be a good solution I would use the method AcceptTcpClient of the System.Net.Sockets.TcpListener class to accept connections. Every time a new client connects, start a new thread to handle the connection. A single TCP endpoint (IP address and port) … | |
Re: [QUOTE]I was wondering if there's a more elegant solution to finding the median value between 3 values.[/QUOTE] How about using a vector? [CODE]size_t len = v2.size(); nth_element( v2.begin(), v2.begin()+len/2,v2.end() ); int median = v2[len/2]; cout << "\nMedian is: " << median << endl; [/CODE] |
The End.