Search Results

Search found 2613 results on 105 pages for 'mike driscoll'.

Page 8/105 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Changing the system time zone succeeds once and then no longer changes

    - by Adam Driscoll
    I'm using the WinAPI to set the time zone on a Windows XP SP3 box. I'm reading the time zone information from the HKLM\Software\Microsoft\WindowsNT\Time Zones\<time zone name> key and then setting the time zone to the specified time zone. I enumerate the keys under the Time Zones key, grab the TZI value and stuff it into a TIME_ZONE_INFORMATION struct to be passed to SetTimeZoneInformation. All seems to work on the first pass. The time zone changes, no error is returned. The second time I perform this operation (same user, new session, on login before userinit) the call succeeds but the system does not reflect the time zone change. Neither the clock nor time stamps on files are updated to the new time zone. When I navigate to: HKLM\System\CurrentControlSet\Control\TimeZoneInformation my new time zone information is present. A couple strange things are happening when I'm setting my time zone: Also when I parse the TZI binary value from the registry to store in my TIME_ZONE_INFORMATION struct I'm noticing the struct has the DaylightDate.wDay and StandardDate.wDay field always set to 0 I tried to call GetTimeZoneInformation right after I call SetTimeZoneInformation but the call fails with a 1300 error (Not all privileges or groups referenced are assigned to the caller. ) I'm also making sure to send a WM_BROADCAST message so Explorer knows whats going on. Think it's the parsing of the byte array to the TIME_ZONE_INFORMATION struct? Or am I missing some thing else important? EDIT: Found a document stating why this is happening: here. Privilege was introduced in Vista...thanks MSDN docs... Per the Microsoft documentation I'm enabling the SE_TIME_ZONE_NAME privilege for the current processes token. But when I attempt to call LookupPriviledgeValue for SE_TIME_ZONE_NAME I get a 1313 error (A specified privilege does not exist. ).

    Read the article

  • Debugger does not break when debugging PowerShell console

    - by Adam Driscoll
    I'm developing a binary PowerShell module. I have a post build event that copies that module into the 'modules' directory in my "Documents\WindowsPowerShell" folder. I then have the project set to launch PowerShell.exe. My module is loaded via Import-Module and off I go. The problem is my break points are never hit and the debugger does not break on exceptions. If I run PowerShell outside of Visual Studio and then attach the debugger to the process I can break just fine. The other strange this is that my break points are not empty. Typically if different source versions are loaded they will be. I'm running Visual Studio 2010 on a Win 7 box. My module is currently targeting .NET 3.5. I've tried running both the x64 and x86 versions of PS with no luck.

    Read the article

  • Am I compiling with x64 JDK?

    - by Mike
    Hi, Do I have the 64 bit of JDK installed on my machine? My java -version says: C:\Documents and Settings\Administratorjava -version java version "1.6.0_20" Java(TM) SE Runtime Environment (build 1.6.0_20-b02) Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode) Should I expect a performance improvement in using a 64 bit compiler versus a 32 bit one? Thanks, Mike

    Read the article

  • How can I run a joomla project?

    - by Mike Redford
    Hi guys, I get a joomla template, but I can't run it. I copy it to htdocs folder in Apache(XAMPP) and it return this : "Restricted access" defined('_JEXEC') or die('Restricted access'); // no direct access require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'functions.php'; please kindly advise me, Cheers, Mike

    Read the article

  • Giving focus to GNOME docked window

    - by mike
    I've got a GTK/GDK docked window that I need to give keyboard focus to, so accelerator keys (shortcuts) work. Does anybody know if GNOME even allows a docked window to have keyboard focus, and if so, how can I enable it? Thanks, Mike

    Read the article

  • C# - Dynamic Keyword and Interface Implementations

    - by Adam Driscoll
    I'm assuming this isn't possible but before digging further is there a way to do something like this: public void ProcessInterface(ISomeInterface obj) {} //... dynamic myDyn = GetDynamic<ISomeInterface>() ProcessInterface(myDyn); I've seen a post arguing for it but it sounds like it wasn't included. A little context: .Net assembly exposed through COM - Silverlight app consuming interface-implementing classes. Would be nice to refer to the objects by interface. I really don't expect that this was what was intended...

    Read the article

  • Simplifying Testing through design considerations while utilizing dependency injection

    - by Adam Driscoll
    We are a few months into a green-field project to rework the Logic and Business layers of our product. By utilizing MEF (dependency injection) we have achieved high levels of code coverage and I believe that we have a pretty solid product. As we have been working through some of the more complex logic I have found it increasingly difficult to unit test. We are utilizing the CompositionContainer to query for types required by these complex algorithms. My unit tests are sometimes difficult to follow due to the lengthy mock object setup process that must take place, just right, to allow for certain circumstances to be verified. My unit tests often take me longer to write than the code that I'm trying to test. I realize this is not only an issue with dependency injection but with design as a whole. Is poor method design or lack of composition to blame for my overly complex tests? I've tried base classing tests, creating commonly used mock objects and ensuring that I utilize the container as much as possible to ease this issue but my tests always end up quite complex and hard to debug. What are some tips that you've seen to keep such tests concise, readable, and effective?

    Read the article

  • Lighttpd check request headers in configuration

    - by Mike Hayes
    Hi I was wondering if it was possible in the configuration of Lighttpd to read request headers, I've searched and searched.. apparently it's not possible. For example, conditional configuration based upon IP address: $HTTP["remoteip"] == "0.0.0.0" { // Do something } Is there something similar to check headers, for example: $HTTP["X-Some-Header"] == "Value" { // Do something } I'm thinking there isn't but thought I would post here as a last resort. Google didn't help much, and Lighttpd documentation would suggest this is not possible. Thanks Mike

    Read the article

  • Why does this crash?

    - by Adam Driscoll
    I've been banging my head...I can't pretend to be a C++ guy... TCHAR * pszUserName = userName.GetBuffer(); SID sid; SecureZeroMemory(&sid, sizeof(sid)); SID_NAME_USE sidNameUse; DWORD cbSid = sizeof(sid); pLog->Log(_T("Getting the SID for user [%s]"), 1, userName); if (!LookupAccountName(NULL, (LPSTR)pszUserName, &sid, &cbSid, NULL, 0, &sidNameUse)) { pLog->Log(_T("Failed to look up user SID. Error code: %d"),1, GetLastError()); return _T(""); } pLog->Log(_T("Converting binary SID to string SID")); The message 'Getting the SID for user [x] is written' but then the app crashes. I'm assuming is was the LookupAccountName call. EDIT: Whoops userName is a MFC CString

    Read the article

  • Getting started on thunderbird extensions

    - by Mike
    Hello there,       I have beein using Tunderbird for many years now and now i am interested in developing some of my own extensions.       I looked over the documentation on their official website but found little suport for getting started at this.       I have some experience with python, perl, php and would like if you can reccomend me some geting started materials, a "hello world" for this would be great Best regards, Mike

    Read the article

  • XAttribute Generating strange namespaces

    - by Adam Driscoll
    I'm constructing an XElement with a couple attributes that have different namespaces. The code looks like this: var element = new XElement("SynchronousCommand", new XAttribute("{wcm}action", "add"), new XAttribute("{ns}id", Guid.NewGuid()), new XElement... ); The XML that is generated looks like this: <unattend xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:schemas-microsoft-com:unattend"> <SynchronousCommand d5p1:action="add" d5p2:id="c0f5fc6d-d407-4d3d-8a05-d84236cca2fb" xmlns:d5p2="ns" xmlns:d5p1="wcm"> ... </SynchronousCommand> </unattend> I'm just wondering if the auto-generated d5p2 is valid and why it is doing this. According to the XML standards here it seems like it would be valid. But why is it not: <unattend xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:schemas-microsoft-com:unattend"> <SynchronousCommand wcm:action="add" ns:id="c0f5fc6d-d407-4d3d-8a05-d84236cca2fb" > To generate the XML I'm doing this: public class unattend { public List<XElement> Any {get;} } var unattend = new unattend(); unattend.Add(element); serializer.Serialize(xmlWriter, unattend);

    Read the article

  • keyboard layout direction

    - by mike
    hi, I would like to detect the direction of the current typing (input) language. I may detect the language by means of "GetKeyboardLayout", but then I'll have to check if it equals to Arabic or Hebrew and so on, is there any way just to detect the direction, i.e. left to right or right to left. thanks! mike.

    Read the article

  • How to know the next temp file to be created in windows?

    - by Mike
    I am by no means a programmer but currently am wondering if an application creates a temp file that windows names. For example the file it creates is tmp001, is there a way i can take that name tmp001 and ask windows to give me the next temp file it would create before it creates it. Thanks, Mike

    Read the article

  • Build Event Macros for Other Projects in the Solution

    - by Adam Driscoll
    Is it possible to reference other projects' properties via a macro within a build event? For example: "Tool1" outputs to directory ..\..\bin\Release "Component1" uses "Tool1" in its post-buildevent To get to "Tool1", "Component1"'s project must do something like $(SolutionDir)bin\Release This requires that Tool1 always output to ..\..\bin\Release. If this is changed this breaks the other project. I know there is no indication to this within the macro list but is there a way to reference another project? Maybe like $(OtherProject.TargetDir)... I know WIX has a similar syntax [$(var.OtherProject.TargetDir)] but I think that may be a different mechanism.

    Read the article

  • Target Framework does not change in Visual Studio 2010

    - by Adam Driscoll
    When I change the target framework of any project in Visual Studio 2010 it does not actually change the System assembly references. For example if I target v2.0 and check the properties of System and System.Data I can see that they are still both v4.0. If i change the target to v3.5, System stays at v4.0 but System.Core changes to v3.5. Because of this I am truly not targeting anything except v4.0.

    Read the article

  • Where to locate the unattend.xml schema

    - by Adam Driscoll
    I'm in need of a way to modify an unattend.xml file programmatically. It would be great if I could just serialize to and from an object. But to do so I would need to get a hold of the schema so that I can run it through XSD. The referenced link provides all the possible settings but it would be nice to have it in XSD format. Any ideas?

    Read the article

  • C# - Ensuring an assembly is called via a specified assembly

    - by Adam Driscoll
    Is there any built in functionality to determine if an assembly is being called from a particular assembly? I have assembly A which references assembly B. Assembly A exposes PowerShell cmdlets and outputs types that are found within B. Certain methods and properties with in types of exposed by B are of interest to types in assembly A but not of interest to consumers of PowerShell or anyone attempting to load types in B directly and call methods within it. I have looked into InternalsVisibleToAttribute but it would require extensive rework because of the use of interfaces. I was devising a shared key system that would later be obfuscated but that seemed clunky. Is there any way to ensure B is called only by A?

    Read the article

  • Batch convert Malformed PDFs to TIF on Linux

    - by Mike Driscoll
    I need to convert a multipage PDF to TIF, but it appears to be a malformed PDF provided by our client. I tried using ImageMagick and GhostScript, but they do not convert the file correctly. The result is only about 85-90% correct. The only thing I've found that appears to do the job is GIMP, but I can't find an example to use it via its Batch Processing methods for PDFs. Here are the warnings I get from ImageMagick and GhostScript: **** Warning: Tf refers to an unknown resource name: FORMS$.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: P06BOB.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: UN308E.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: P06BOB.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: UN308E.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: P06BOB.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: UN308E.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: UN307A.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: UN104A.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: UN308E.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: UN208E.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: UN308E.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: UN208E.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: HE14BP.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: UN208E.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: UN106E.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: UN208E.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: UN106E.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: UN208E.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: HE08BP.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: HE11BP.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: AR10NP.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: UN308E.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: JIMP2.l Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: HS11C.l Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: FORMS$.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: UN104A.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: UN208E.f Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: UN307E.f Assuming it's a font name. **** This file had errors that were repaired or ignored. **** Please notify the author of the software that produced this **** file that it does not conform to Adobe's published PDF **** specification. I'm open to other suggestions too. Thanks!

    Read the article

  • Input Sanitation Best Practices

    - by Adam Driscoll
    Our team has recently been working on a logic and data layer for our database. We were not approved to utilize Entity or Linq to SQL for the data layer. It was primarily built by hand. A lot of the SQL is auto generated. An obvious down fall of this is the need to sanitize inputs prior to retrieval and insertion. What are the best methods for doing this? Searching for terms like insert, delete, etc seems like a poor way to accomplish this. Is there a better alternative?

    Read the article

  • Identifying if a user is in the local administrators group

    - by Adam Driscoll
    My Problem I'm using PInvoked Windows API functions to verify if a user is part of the local administrators group. I'm utilizing GetCurrentProcess, OpenProcessToken, GetTokenInformationand LookupAccountSid to verify if the user is a local admin. GetTokenInformation returns a TOKEN_GROUPS struct with an array of SID_AND_ATTRIBUTES structs. I iterate over the collection and compare the user names returned by LookupAccountSid. My problem is that, locally (or more generally on our in-house domain), this works as expected. The builtin\Administrators is located within the group membership of the current process token and my method returns true. On another domain of another developer the function returns false. The LookupAccountSid functions properly for the first 2 iterations of the TOKEN_GROUPS struct, returning None and Everyone, and then craps out complaining that "A Parameter is incorrect." What would cause only two groups to work correctly? The TOKEN_GROUPS struct indicates that there are 14 groups. I'm assuming it's the SID that is invalid. Everything that I have PInvoked I have taken from an example on the PInvoke website. The only difference is that with the LookupAccountSid I have changed the Sid parameter from a byte[] to a IntPtr because SID_AND_ATTRIBUTESis also defined with an IntPtr. Is this ok since LookupAccountSid is defined with a PSID? LookupAccountSid PInvoke [DllImport("advapi32.dll", CharSet = CharSet.Auto, SetLastError = true)] static extern bool LookupAccountSid( string lpSystemName, IntPtr Sid, StringBuilder lpName, ref uint cchName, StringBuilder ReferencedDomainName, ref uint cchReferencedDomainName, out SID_NAME_USE peUse); Where the code falls over for (int i = 0; i < usize; i++) { accountCount = 0; domainCount = 0; //Get Sizes LookupAccountSid(null, tokenGroups.Groups[i].SID, null, ref accountCount, null, ref domainCount, out snu); accountName2.EnsureCapacity((int) accountCount); domainName.EnsureCapacity((int) domainCount); if (!LookupAccountSid(null, tokenGroups.Groups[i].SID, accountName2, ref accountCount, domainName, ref domainCount, out snu)) { //Finds its way here after 2 iterations //But only in a different developers domain var error = Marshal.GetLastWin32Error(); _log.InfoFormat("Failed to look up SID's account name. {0}", new Win32Exception(error).Message); continue; } If more code is needed let me know. Any help would be greatly appreciated.

    Read the article

  • ExpandEnvironmentStrings Not Expanding My Variables

    - by Adam Driscoll
    I have a process under the Run key in the registry. It is trying to access an environment variable that I have defined in a previous session. I'm using ExpandEnvironmentStrings to expand the variable within a path. The environment variable is a user profile variable. When I run my process on the command line it does not expand as well. If I call 'set' I can see the variable. Some code... CString strPath = "\\\\server\\%share%" TCHAR cOutputPath[32000]; DWORD result = ExpandEnvironmentStrings((LPSTR)&strPath, (LPSTR)&cOutputPath, _tcslen(strPath) + 1); if ( !result ) { int lastError = GetLastError(); pLog->Log(_T( "Failed to expand environment strings. GetLastError=%d"),1, lastError); } When debugging Output path is exactly the same as Path. No error code is returned. What is goin on?

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >