Search Results

Search found 3467 results on 139 pages for 'win'.

Page 93/139 | < Previous Page | 89 90 91 92 93 94 95 96 97 98 99 100  | Next Page >

  • Apache timeouts and error log

    - by BlackFire27
    I have an error whenever I run my code for a certain time. I use a lot of loops and sql connections. I basically, put and take out links from my database. The problem is that there is some error thrown that I cant see, whenever I execute a long sql operation .. Note that the fault isnt the code. The code runs well, whenever there are a few links involved. But when there are over 200 links.. an error is thrown that I cants see. I tried to trace the error in a few places: C:\Program Files\Zend\ZendServer\logs\php_error.log C:\Program Files\Zend\phpMyAdmin\config.inc.php Edit Viewer in win xp I am running XP: Windows xp php version: 5.3.9-ZS5.6.0. Apache/2.2.21 Apacher version: (Win32) mod_ssl/2.2.21 OpenSSL/0.9.8o I cant trace the error at all, and why it happens. All I can suspect of, is that there is a server timeout..

    Read the article

  • Nvidia driver on Windows 7 causing black screen

    - by inKit
    I have just installed Windows 7 on a desktop machine and for the first time ever have had a really tough time doing so, its normally a nice smooth install. This time I found that the monitor would simply go black after completing the installation. I tried reinstalling about 3 times and this did not help. After much searching I discovered that it was the nvidia drivers that were playing up with win 7, so i booted into safe mode, disabled the device, then rebooted to complete the installation. Windows 7 now works fine as long as the nvidia 9600 gt video card is disabled. The moment I enable it, the system requires a reboot and the screen will go black before even getting to the log in screen. I have tried downloading the latest driver and installing it manually, I have also tried uninstalling the device and allowing windows 7 to install it itself. Nothing seems to work. any clues?

    Read the article

  • Slow remote desktop connection to VPS

    - by Jonathan
    When I use Windows 7's remote desktop connection to our company's VPS (Win Server 2008 32bit) I receive a very slow connection - most of the times it actually grinds down to a complete halt. This is in contrast to my team mates which have no problem remoting to the VPS. I'm using a brand new Dell Studio 1558 laptop with Intel Core i7 and 4GB RAM with a clean installation of Windows 7 64bit Ultimate. Any suggestions for how to diagnose \ solve \ workaround the problem would be appreciated. UPDATES: I checked, and it seems the problem exists with all the computers connected to my home LAN. Once I take my laptop to the nearest coffee shop it works fine. What could be the problem with the LAN?

    Read the article

  • VPN (PPTP) in Virtual Machine (WinXP in VM Workstation 8 )

    - by user1059617
    i am trying to establish a VPN Connection in my GuestOS. But i get a timeout every Time. The Host : Win 7 The Guest: WinXp Software: VM-Workstation 8 The GuestOS is bridged to the Host network and has his own IP. The normal Connection in the GuestOS works fine but when i try to establish the VPN (no Programm used , just simple Windows VPN) i get an timeout? But i can establish the VPN from the Host without any problems... Any Ideas here? Thanks Ps:(If it matters: The VPN is PPTP from StrongVPN)

    Read the article

  • PPTP VPN Server issue : server = centOS & client = windows 7

    - by jmassic
    I have a CentOS server configured as a PPTP VPN Server. The client is a Windows 7 with "Use default gateway on remote network" in advanced TCP/IPv4 properties enable. He can connect to CentOS without any problem and can access to: The Box of his ISP (http://192.168.1.254/) The CentOS server The website which is hosted by the server (through http://) But he canNOT access any other web service (google.com or 74.125.230.224) I am a beginner with web servers so I do not know what can cause this problem. Note 0 : The Windows 7 user must be able to access the whole internet through the CentOS PPTP proxy. Note 1 : With "Use default gateway on remote network" in advanced TCP/IPv4 UNCHECKED it is the same problem Note 2 : With "Use default gateway on remote network" in advanced TCP/IPv4 UNCHECKED AND "disable class based route addition" CHECKED the Win 7 can access google but with the ISP IP (no use of the VPN...) See Screenshot Note 3 : I have made a echo 1 > /proc/sys/net/ipv4/ip_forward and a iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

    Read the article

  • Has anyone found a (eg bash) shell terminal for Windows as good as the OS X one?

    - by Anentropic
    I am mostly using 'git-bash' which came with the Windows install of Git vcs. I think it is the same one that comes with Cygwin. It works fine technically but the UI sucks: have to right-click the title bar and go to Properties to change the window width most annoyingly... copy and paste and highlight with the mouse are equally cumbersome In contrast, the Terminal app that comes with OS X manages these with aplomb and makes it so much more comfortable to work with. You can even drag and drop a file on it and it will paste the file path in at your cursor! I have also tried: http://sourceforge.net/projects/win-bash http://www.steve.org.uk/Software/bash/ http://www.hamiltonlabs.com/cshell.htm None of these do copy and paste of text without cumbersome right-clicking. I am specifically looking for a Unix-flavoured shell in Windows so I don't have to use different shells between my home dev (Windows), the live server (Linux) or dev at the office (Mac). Yes I have Googled and haven't found one yet...

    Read the article

  • How can one make the title bar text have better contrast on dark colors in Windows 8?

    - by zeel
    When Windows 8 color setting are set to a very dark color, such as black or navy blue, the title bar text and the minimize/maximize buttons are nearly invisible. This makes dark colors difficult to work with. In Windows 7 there was an advanced color options, this is gone in 8. The registry keys associated with this seem to still be present, but they have no effect. Is there a way to change this? Or a third party application that can do it? I don't want to use the ugly high contrast theme, I want to use the nice Win 8 theme with a dark color.

    Read the article

  • Windows 7 cannot connect wirelessly to Netgear Router WPN824 V2

    - by edo152
    I have a new HP Laptop running Win 7 Home Premium with an Atheros Wireless card. I have a Negear WPN824 V2 Rangemax Router. The router works with a wired connection. Wirelessly it can see the network but it cannot connect. I have searched the web and the WPN824 seems to work for some people, but I cannot get it to connect. I have tried disabling Bonjour Service and a few other things but it continues not to connect. Am I probably correct to assume that the WPN824 is somehow incompatible with Wiondows 7? or am I missing some simple change I should make?

    Read the article

  • Tomcat Apache not working on Win7

    - by Javanator
    I have installed Tomcat Apache 6.0 onto my system after downloading it from http://tomcat.apache.org/download-55.cgi using the Windows installer I install the system. But after successful installation the service doesn't start. Stating an error like follows: Windows could not start the Apache tomcat on Local Computer, For More Information, review the System Event Log. If this is a non microsoft service, contact the service vendor, and refer to the service specific error code 0 I then try to install the same installer on Win XP and it worked. Don't know how to resolve this problem and how to get it started on Win7. Any help would be appreciated. Thank you.

    Read the article

  • psql editor setting on Ubuntu

    - by dezso
    The situation is the following. This is an Ubuntu box: Linux ns3mx3 2.6.32-41-server #89-Ubuntu SMP Fri Apr 27 22:33:31 UTC 2012 x86_64 GNU/Linux Which means that when I first issue \e in psql, I'm asked to choose an editor. Then there is the .selected_editor file, which contains # Generated by /usr/bin/select-editor SELECTED_EDITOR="/usr/bin/mcedit-debian" So far this is OK (it's my problem that I consider this completely useless, but never mind). Then I set up a .psqlrc file: \set PSQL_EDITOR /usr/bin/vim \set EDITOR /usr/bin/vim \set VISUAL /usr/bin/vim As you can see, I wanted to be sure not to miss a candidate variable for editor setting. The file is used as expected: test=# \echo :EDITOR /usr/bin/vim But when I issue the \e command, none of these is used - I fall back to SELECTED_EDITOR. The situation remains just the same if I append an \unset SELECTED_EDITOR to the .psqlrc file. Now how can I make .psqlrc setting win over the default editor? (PostgreSQL version id 9.1.4)

    Read the article

  • How to get Notepad++ to open files properly in Windows 8?

    - by zeel
    For some reason in Windows 8 if I try to open a file in Notepad++ by either rightclick "Edit witrh Notepad++" or by rightclick open with Notepad++ it will only bring NPP to the foreground, but not open the file. The only way to open a file seems to be with the open/browse button in NPP. This is far less efficient, as I already found the file, and must then find it a second time through the file browser. This is obviously a bug in either NPP, Win 8, or my system. Is anyone else experiancing this? if so, is there a way to fix it?

    Read the article

  • linux - Is Debian "lighter" than Ubuntu?

    - by user2983756
    I currently run Linux Mint 14 KDE on a "semi-old" machine I use for working and surfing the web - it was the first Linux system I ever used (running away from old Win XP), so I picked a complete system that would have most of my basic needs installed (I didn't even know what exactly all those needs were at the time). The thing is, my computer is becoming really old and Mint is a cluttered system, and for the next installation I'm going to try and install a "raw" system and get everything from the online repos. My question is: Since Ubuntu is Debian-based, does that make it consume more resources than its base system? If that isn't the difference, which one is "lighter" in that sense?

    Read the article

  • How can I connect Ubuntu Server 10.04 virtualbox without router from my local computer?

    - by kjaja70
    I installed vbox I installed ubuntu server 10.04 on my vbox I want to connect from my win 7 desktop with putty to my server. On the settings in my vm vbos I choose - network. enable network - bridged adapter. I fount in ifconfig the ip address. Putty cant connect to the server. Why? How can I connect Ubuntu Server 10.04 virtualbox from my local computer? p.s. I dont have router - I have modem. Thanks a lot.

    Read the article

  • Server 2008 DHCP some clients not getting IP

    - by AdminAlive
    Today (after turning on the server from an extended power outage) some clients are not able to get IP addresses. Some clients work just fine. Win 7 and XP doesnt seem to matter. I have tried flushing dns, renew, disabling APIPA and even assigned a static IP. Even with the static IP it acts as if it isn't on a network. You can't ping anything. I have also tried resetting the TCPIP stack. The clients that work can ping the DNS and DHCP servers fine. Any suggestions? Thanks

    Read the article

  • Do I need to Sysprep Windows 7

    - by Cell-o
    Let's say I have one image and I want to put same image on many identical lenovo laptop's. These new machines have site licence (Office 2010, Windows 7). My questions : 1 - What software do you recommended for this project? e.g Acronis True Image , Clonezilla ,MDT 2 - How do I take the image? after Win 7 and Office 2010 activate process or before ? I'm very confused. e.g : many website saying "you must sysprep when deploying Windows 7 machine." is that correct? if this is correct why?

    Read the article

  • Best way to log internet traffic for office network via remote IP

    - by buzzmonkey
    We have a network of about 40 machines running either Win XP or 7 in our office via LAN switches into 1 x Netgear Router (WNDR3700). We have noticed recently that our local network has been added to the CBL Blacklist due to one of our machines being infected with Torpig. I have attempted to use Kaspersky's TDSSKiller Antirootkit Utility to find the infected machine but all appear to be clear. The CBL register advises to find the local machine which is connection to the remote IP address (CBL has provided the range). However, our router does not have the ability to block remote IP addresses - does anyone know of a software which can log all the internet traffic, which we can then use to find the infected machine.

    Read the article

  • Asus V1S, no video signals but boots ok

    - by user52441
    Hey folks! I got a mayor problem with my 3 year old my Asus V1S notebook. After installing VMWare Player an rebooting the screen remained black and there was no POST screen. Also the other video outputs - VGA and HDMI - send no signals. However the maschine boots into Windows 7 properly (sounds waren played) and I can log in by blindly typing my pw. Testend WIN-P and functiom keys but no luck with that. Google is no help here, thats why I basketball you superusers! Please give me hints if you have any idea or if you experienced a similar problem. Thank you so much!

    Read the article

  • Why is the word PERSONAL still relevant in the term PC? [closed]

    - by Bill
    I have spent half an hour trying to change an icon on my Win-7-64 machine (Why Can't I Change the Icon). One reasonable suggestion (reasonable in terms of having a solution, not reasonable in terms of having to jump through these hoops for such a basic requirement) was to delete the old icon from the %userprofile% \ Local Settings..., however when I click on this folder in Windows Explorer I am told the folder is not accessible - Access Denied. Well! It's my PERSONAL computer isn't it? Isn't that what PC stands for? It's MY computer - why can't I get access to that folder? It's about time we started calling these machines MCs (Microsoft Computer), or WCs (Windows Computer) - because they sure as hell aint PERSONAL damn computers!!!!

    Read the article

  • How to backup/restore IIS 5.1 or move to another machine?

    - by mickeyf
    We have a web based application that run on an Intranet. For various reasons, we are constrained to using Win XP and the version of IIS that ships with it, 5.1. http://support.microsoft.com/kb/325889 talks about backing up IIS, but the sentence: "This backup method does not work if you reinstall your operating system." makes me nervous. Our main reason for backing up is in the event of catastrophic failure, which would certainly mean reinstalling the operating system. I imagine there must be a fairly painless mechanism for backing up and restoring to a fresh machine (or moving to a different one), but I have not found it. Also this is instructions for manually backing up. An automated process would be even better. thanks!

    Read the article

  • Hosting ESXI (free edition) [closed]

    - by Peter Adss
    We currently have one physical server running the free version of VMWare ESXi that virtualizes a Win SBS 2003 server and a Citrix server. We need to collocate the server and are investigating our options. Are there places that will host our virtual servers and save us the expense of shipping the physical server out for collocation. In my mind we'd copy the Vms to disk and ship them out. Does the fact that we're using the free version of ESXi create a barrier to this idea? Thanks for the help, I realize this is a stupid question.

    Read the article

  • Add collection or array to wpf resource dictionary

    - by Chris Cap
    I've search high and low and can't find an answer to this. I have two questions How do you create an array or collection in XAML. I've got an array I want to stick in there and bind to a combo box. My first idea was to put an ItemsControl in a resource dictionary, but the ItemsSource of a combo box expects IEnumerable so that didn't work. Here's what I've tried in my resource dictionary and neither works <ItemsControl x:Key="stateList"> <sys:String>AL</sys:String> <sys:String>CA</sys:String> <sys:String>CN</sys:String> </ItemsControl> <ItemsControl x:Key="stateList2"> <ComboBoxItem>AL</ComboBoxItem> <ComboBoxItem>CA</ComboBoxItem> <ComboBoxItem>CN</ComboBoxItem> </ItemsControl> and here's how I bind to it <ComboBox SelectedValue="{Binding Path=State}" ItemsSource="{Binding Source={StaticResource stateList2}}" > </ComboBox> EDIT: UPDATED I got this first part to work this way <col:ArrayList x:Key="stateList3"> <sys:String>AL</sys:String> <sys:String>CA</sys:String> <sys:String>CN</sys:String> </col:ArrayList> However, I'd rather not use an array list, I'd like to use a generic list so if anyone knows how please let me know. EDIT UPDATE: I guess XAML has very limited support for generics so maybe an array list is the best I can do for now, but I would still like help on the second question if anyone has an anser 2nd. I've tried referencing a merged resource dictionary in my XAML and had problems because under Window.resources I had more than just the dictionary so it required me to add x:Key. Once I add the key, the system can no longer find the items in my resource dictionary. I had to move the merged dictionary to Grid.Resources instead. Ideally I'd like to reference the merged dictionary in the app.xaml but I have the same problem Here's some sample code. This first part required an x:key to compile because I have converter and it complained that every item must have a key if there is more than one <UserControl.Resources> <win:BooleanToVisibilityConverter x:Key="VisibilityConverter" /> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="/ResourcesD.xaml" /> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </UserControl.Resources> I had to change it to this <UI:BaseStep.Resources> <win:BooleanToVisibilityConverter x:Key="VisibilityConverter" /> </UI:BaseStep.Resources> <Grid> <Grid.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="/ResourcesD.xaml" /> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Grid.Resources> </Grid> Thank you

    Read the article

  • About the MSDN NOTIFYICONDATA's cbSize member

    - by KenC
    Hi, I am reading the NOTIFYICONDATA documentation in MSDN. It says the NOTIFYICONDATA structure has a cbSize member should be set to the size of the structure, but NOTIFYICONDATA structure's size has different size in every Shell32.dll, so you should get the Shell32.dll version before setting cbSize. The following quotes from MSDN: If it is version 5.0 or later, initialize the cbSize member as follows. nid.cbSize = sizeof(NOTIFYICONDATA); Setting cbSize to this value enables all the version 5.0 and 6.0 enhancements. For earlier versions, the size of the pre-6.0 structure is given by the NOTIFYICONDATA_V2_SIZE constant and the pre-5.0 structure is given by the NOTIFYICONDATA_V1_SIZE constant. Initialize the cbSize member as follows. nid.cbSize = NOTIFYICONDATA_V2_SIZE; Using this value for cbSize will allow your application to use NOTIFYICONDATA with earlier Shell32.dll versions, although without the version 6.0 enhancements. I found it a bit of vague, because 'sizeof(NOTIFYICONDATA)' has different value in Win98 (using Shell32.dll version 4.x), Win2K (version 5.0) and WinXP (version 6.0). How could it 'enable all version 5.0 and 6.0 enhancements'? So I looked for the definition of NOTIFYICONDATA_V1_SIZE (source code as below), I see: NOTIFYICONDATA_V1_SIZE is for Win 2K (doesn't include 2K) NOTIFYICONDATA_V2_SIZE is for Win XP NOTIFYICONDATA_V3_SIZE is for Vista (not sure if I am right) It's completely different from what MSDN says? and none for Win2K? So, I am totaly confused right now. How should I set the cbSize member according to Shell32.dll version? Could anybody help me... Thanks in advance. //= = = = = = = = ShellAPI.h = = = = = = = = typedef struct _NOTIFYICONDATAA { DWORD cbSize; HWND hWnd; UINT uID; UINT uFlags; UINT uCallbackMessage; HICON hIcon; #if (NTDDI_VERSION < NTDDI_WIN2K) CHAR szTip[64]; #endif #if (NTDDI_VERSION >= NTDDI_WIN2K) CHAR szTip[128]; DWORD dwState; DWORD dwStateMask; CHAR szInfo[256]; union { UINT uTimeout; UINT uVersion; // used with NIM_SETVERSION, values 0, 3 and 4 } DUMMYUNIONNAME; CHAR szInfoTitle[64]; DWORD dwInfoFlags; #endif #if (NTDDI_VERSION >= NTDDI_WINXP) GUID guidItem; #endif #if (NTDDI_VERSION >= NTDDI_VISTA) HICON hBalloonIcon; #endif } NOTIFYICONDATAA, *PNOTIFYICONDATAA; typedef struct _NOTIFYICONDATAW { DWORD cbSize; HWND hWnd; UINT uID; UINT uFlags; UINT uCallbackMessage; HICON hIcon; #if (NTDDI_VERSION < NTDDI_WIN2K) WCHAR szTip[64]; #endif #if (NTDDI_VERSION >= NTDDI_WIN2K) WCHAR szTip[128]; DWORD dwState; DWORD dwStateMask; WCHAR szInfo[256]; union { UINT uTimeout; UINT uVersion; // used with NIM_SETVERSION, values 0, 3 and 4 } DUMMYUNIONNAME; WCHAR szInfoTitle[64]; DWORD dwInfoFlags; #endif #if (NTDDI_VERSION >= NTDDI_WINXP) GUID guidItem; #endif #if (NTDDI_VERSION >= NTDDI_VISTA) HICON hBalloonIcon; #endif } NOTIFYICONDATAW, *PNOTIFYICONDATAW; #define NOTIFYICONDATAA_V1_SIZE FIELD_OFFSET(NOTIFYICONDATAA, szTip[64]) #define NOTIFYICONDATAW_V1_SIZE FIELD_OFFSET(NOTIFYICONDATAW, szTip[64]) #ifdef UNICODE #define NOTIFYICONDATA_V1_SIZE NOTIFYICONDATAW_V1_SIZE #else #define NOTIFYICONDATA_V1_SIZE NOTIFYICONDATAA_V1_SIZE #endif #define NOTIFYICONDATAA_V2_SIZE FIELD_OFFSET(NOTIFYICONDATAA, guidItem) #define NOTIFYICONDATAW_V2_SIZE FIELD_OFFSET(NOTIFYICONDATAW, guidItem) #ifdef UNICODE #define NOTIFYICONDATA_V2_SIZE NOTIFYICONDATAW_V2_SIZE #else #define NOTIFYICONDATA_V2_SIZE NOTIFYICONDATAA_V2_SIZE #endif #define NOTIFYICONDATAA_V3_SIZE FIELD_OFFSET(NOTIFYICONDATAA, hBalloonIcon) #define NOTIFYICONDATAW_V3_SIZE FIELD_OFFSET(NOTIFYICONDATAW, hBalloonIcon) #ifdef UNICODE #define NOTIFYICONDATA_V3_SIZE NOTIFYICONDATAW_V3_SIZE #else #define NOTIFYICONDATA_V3_SIZE NOTIFYICONDATAA_V3_SIZE #endif (Seems like the code doesn't look good on the web site, but it from ShellAPI.h, all the same)

    Read the article

  • About the MSDN Documentation on NOTIFYICONDATA's cbSize member

    - by KenC
    I am reading the NOTIFYICONDATA documentation in MSDN. It says the NOTIFYICONDATA structure has a cbSize member should be set to the size of the structure, but NOTIFYICONDATA structure's size has different size in every Shell32.dll, so you should get the Shell32.dll version before setting cbSize. The following quotes from MSDN: If it is version 5.0 or later, initialize the cbSize member as follows. nid.cbSize = sizeof(NOTIFYICONDATA); Setting cbSize to this value enables all the version 5.0 and 6.0 enhancements. For earlier versions, the size of the pre-6.0 structure is given by the NOTIFYICONDATA_V2_SIZE constant and the pre-5.0 structure is given by the NOTIFYICONDATA_V1_SIZE constant. Initialize the cbSize member as follows. nid.cbSize = NOTIFYICONDATA_V2_SIZE; Using this value for cbSize will allow your application to use NOTIFYICONDATA with earlier Shell32.dll versions, although without the version 6.0 enhancements. I found it a bit of vague, because 'sizeof(NOTIFYICONDATA)' has different value in Win98 (using Shell32.dll version 4.x), Win2K (version 5.0) and WinXP (version 6.0). How could it 'enable all version 5.0 and 6.0 enhancements'? So I looked for the definition of NOTIFYICONDATA_V1_SIZE (source code as below), I see: NOTIFYICONDATA_V1_SIZE is for Win 2K (doesn't include 2K) NOTIFYICONDATA_V2_SIZE is for Win XP NOTIFYICONDATA_V3_SIZE is for Vista (not sure if I am right) It's completely different from what MSDN says? and none for Win2K? So, I am totally confused right now. How should I set the cbSize member according to Shell32.dll version? //= = = = = = = = ShellAPI.h = = = = = = = = typedef struct _NOTIFYICONDATAA { DWORD cbSize; HWND hWnd; UINT uID; UINT uFlags; UINT uCallbackMessage; HICON hIcon; #if (NTDDI_VERSION < NTDDI_WIN2K) CHAR szTip[64]; #endif #if (NTDDI_VERSION >= NTDDI_WIN2K) CHAR szTip[128]; DWORD dwState; DWORD dwStateMask; CHAR szInfo[256]; union { UINT uTimeout; UINT uVersion; // used with NIM_SETVERSION, values 0, 3 and 4 } DUMMYUNIONNAME; CHAR szInfoTitle[64]; DWORD dwInfoFlags; #endif #if (NTDDI_VERSION >= NTDDI_WINXP) GUID guidItem; #endif #if (NTDDI_VERSION >= NTDDI_VISTA) HICON hBalloonIcon; #endif } NOTIFYICONDATAA, *PNOTIFYICONDATAA; typedef struct _NOTIFYICONDATAW { DWORD cbSize; HWND hWnd; UINT uID; UINT uFlags; UINT uCallbackMessage; HICON hIcon; #if (NTDDI_VERSION < NTDDI_WIN2K) WCHAR szTip[64]; #endif #if (NTDDI_VERSION >= NTDDI_WIN2K) WCHAR szTip[128]; DWORD dwState; DWORD dwStateMask; WCHAR szInfo[256]; union { UINT uTimeout; UINT uVersion; // used with NIM_SETVERSION, values 0, 3 and 4 } DUMMYUNIONNAME; WCHAR szInfoTitle[64]; DWORD dwInfoFlags; #endif #if (NTDDI_VERSION >= NTDDI_WINXP) GUID guidItem; #endif #if (NTDDI_VERSION >= NTDDI_VISTA) HICON hBalloonIcon; #endif } NOTIFYICONDATAW, *PNOTIFYICONDATAW; #define NOTIFYICONDATAA_V1_SIZE FIELD_OFFSET(NOTIFYICONDATAA, szTip[64]) #define NOTIFYICONDATAW_V1_SIZE FIELD_OFFSET(NOTIFYICONDATAW, szTip[64]) #ifdef UNICODE #define NOTIFYICONDATA_V1_SIZE NOTIFYICONDATAW_V1_SIZE #else #define NOTIFYICONDATA_V1_SIZE NOTIFYICONDATAA_V1_SIZE #endif #define NOTIFYICONDATAA_V2_SIZE FIELD_OFFSET(NOTIFYICONDATAA, guidItem) #define NOTIFYICONDATAW_V2_SIZE FIELD_OFFSET(NOTIFYICONDATAW, guidItem) #ifdef UNICODE #define NOTIFYICONDATA_V2_SIZE NOTIFYICONDATAW_V2_SIZE #else #define NOTIFYICONDATA_V2_SIZE NOTIFYICONDATAA_V2_SIZE #endif #define NOTIFYICONDATAA_V3_SIZE FIELD_OFFSET(NOTIFYICONDATAA, hBalloonIcon) #define NOTIFYICONDATAW_V3_SIZE FIELD_OFFSET(NOTIFYICONDATAW, hBalloonIcon) #ifdef UNICODE #define NOTIFYICONDATA_V3_SIZE NOTIFYICONDATAW_V3_SIZE #else #define NOTIFYICONDATA_V3_SIZE NOTIFYICONDATAA_V3_SIZE #endif (Seems like the code doesn't look good on the web site, but it from ShellAPI.h, all the same)

    Read the article

  • When should I use indexed arrays of OpenGL vertices?

    - by Tartley
    I'm trying to get a clear idea of when I should be using indexed arrays of OpenGL vertices, drawn with gl[Multi]DrawElements and the like, versus when I should simply use contiguous arrays of vertices, drawn with gl[Multi]DrawArrays. (Update: The consensus in the replies I got is that one should always be using indexed vertices.) I have gone back and forth on this issue several times, so I'm going to outline my current understanding, in the hopes someone can either tell me I'm now finally more or less correct, or else point out where my remaining misunderstandings are. Specifically, I have three conclusions, in bold. Please correct them if they are wrong. One simple case is if my geometry consists of meshes to form curved surfaces. In this case, the vertices in the middle of the mesh will have identical attributes (position, normal, color, texture coord, etc) for every triangle which uses the vertex. This leads me to conclude that: 1. For geometry with few seams, indexed arrays are a big win. Follow rule 1 always, except: For geometry that is very 'blocky', in which every edge represents a seam, the benefit of indexed arrays is less obvious. To take a simple cube as an example, although each vertex is used in three different faces, we can't share vertices between them, because for a single vertex, the surface normals (and possible other things, like color and texture co-ord) will differ on each face. Hence we need to explicitly introduce redundant vertex positions into our array, so that the same position can be used several times with different normals, etc. This means that indexed arrays are of less use. e.g. When rendering a single face of a cube: 0 1 o---o |\ | | \ | | \| o---o 3 2 (this can be considered in isolation, because the seams between this face and all adjacent faces mean than none of these vertices can be shared between faces) if rendering using GL_TRIANGLE_FAN (or _STRIP), then each face of the cube can be rendered thus: verts = [v0, v1, v2, v3] colors = [c0, c0, c0, c0] normal = [n0, n0, n0, n0] Adding indices does not allow us to simplify this. From this I conclude that: 2. When rendering geometry which is all seams or mostly seams, when using GL_TRIANGLE_STRIP or _FAN, then I should never use indexed arrays, and should instead always use gl[Multi]DrawArrays. (Update: Replies indicate that this conclusion is wrong. Even though indices don't allow us to reduce the size of the arrays here, they should still be used because of other performance benefits, as discussed in the comments) The only exception to rule 2 is: When using GL_TRIANGLES (instead of strips or fans), then half of the vertices can still be re-used twice, with identical normals and colors, etc, because each cube face is rendered as two separate triangles. Again, for the same single cube face: 0 1 o---o |\ | | \ | | \| o---o 3 2 Without indices, using GL_TRIANGLES, the arrays would be something like: verts = [v0, v1, v2, v2, v3, v0] normals = [n0, n0, n0, n0, n0, n0] colors = [c0, c0, c0, c0, c0, c0] Since a vertex and a normal are often 3 floats each, and a color is often 3 bytes, that gives, for each cube face, about: verts = 6 * 3 floats = 18 floats normals = 6 * 3 floats = 18 floats colors = 6 * 3 bytes = 18 bytes = 36 floats and 18 bytes per cube face. (I understand the number of bytes might change if different types are used, the exact figures are just for illustration.) With indices, we can simplify this a little, giving: verts = [v0, v1, v2, v3] (4 * 3 = 12 floats) normals = [n0, n0, n0, n0] (4 * 3 = 12 floats) colors = [c0, c0, c0, c0] (4 * 3 = 12 bytes) indices = [0, 1, 2, 2, 3, 0] (6 shorts) = 24 floats + 12 bytes, and maybe 6 shorts, per cube face. See how in the latter case, vertices 0 and 2 are used twice, but only represented once in each of the verts, normals and colors arrays. This sounds like a small win for using indices, even in the extreme case of every single geometry edge being a seam. This leads me to conclude that: 3. When using GL_TRIANGLES, one should always use indexed arrays, even for geometry which is all seams. Please correct my conclusions in bold if they are wrong.

    Read the article

  • How to copy bytes from buffer into the managed struct?

    - by Chupo_cro
    I have a problem with getting the code to work in a managed environment (VS2008 C++/CLI Win Forms App). The problem is I cannot declare the unmanaged struct (is that even possible?) inside the managed code, so I've declared a managed struct but now I have a problem how to copy bytes from buffer into that struct. Here is the pure C++ code that obviously works as expected: typedef struct GPS_point { float point_unknown_1; float latitude; float longitude; float altitude; // x10000 float time; int point_unknown_2; int speed; // x100 int manually_logged_point; // flag (1 --> point logged manually) } track_point; int offset = 0; int filesize = 256; // simulates filesize int point_num = 10; // simulates number of records int main () { char *buffer_dyn = new char[filesize]; // allocate RAM // here, the file would have been read into the buffer buffer_dyn[0xa8] = 0x1e; // simulates the speed data (1e 00 00 00) buffer_dyn[0xa9] = 0x00; buffer_dyn[0xaa] = 0x00; buffer_dyn[0xab] = 0x00; offset = 0x90; // if the data with this offset is transfered trom buffer // to struct, int speed is alligned with the buffer at the // offset of 0xa8 track_point *points = new track_point[point_num]; points[0].speed = 0xff; // (debug) it should change into 0x1e memcpy(&points[0],buffer_dyn+offset,32); cout << "offset: " << offset << "\r\n"; //cout << "speed: " << points[0].speed << "\r\n"; printf ("speed : 0x%x\r\n",points[0].speed); printf("byte at offset 0xa8: 0x%x\r\n",(unsigned char)buffer_dyn[0xa8]); // should be 0x1e delete[] buffer_dyn; // release RAM delete[] points; /* What I need is to rewrite the lines 29 and 31 to work in the managed code (VS2008 Win Forms C++/CLI) What should I have after: array<track_point^>^ points = gcnew array<track_point^>(point_num); so I can copy 32 bytes from buffer_dyn to the managed struct declared as typedef ref struct GPS_point { float point_unknown_1; float latitude; float longitude; float altitude; // x10000 float time; int point_unknown_2; int speed; // x100 int manually_logged_point; // flag (1 --> point logged manually) } track_point; */ return 0; } Here is the paste to codepad.org so it can be seen the code is OK. What I need is to rewrite these two lines: track_point *points = new track_point[point_num]; memcpy(&points[0],buffer_dyn+offset,32); to something that will work in a managed application. I wrote: array<track_point^>^ points = gcnew array<track_point^>(point_num); and now trying to reproduce the described copying of the data from buffer over the struct, but haven't any idea how it should be done. Alternatively, if there is a way to use an unmanaged struct in the same way shown in my code, then I would like to avoid working with managed struct.

    Read the article

< Previous Page | 89 90 91 92 93 94 95 96 97 98 99 100  | Next Page >