Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. lupidus

    Writing null characters to a file

    Turns out my pointers were messed up: cStr = strncat(cStr, "\0", 1); // doesn't do anything replaced with: *(cStr + size) = '\0'; // size is hardcoded for now and changed fwrite to fwrite( cStr, size, 1, stream );
  2. lupidus

    Writing null characters to a file

    ...the binary string? this is one of the reason they tell us to encode binary data when using a null terminated string to contain it. My code: char * cStr = reinterpret_cast< char *>(lpVoid); cStr = strncat(cStr, "\0", 1); printf("size of cStr%d\n", sizeof(cStr)); FILE * stream; if( (stream =...
  3. lupidus

    CreateProcessWithLogonW to exec a function instead of a process

    Is there a way to customize CreateProcessWithLogonW (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/createprocesswithlogonw.asp) but have it do a function call instead? I'm currently doing something like this and want to cut my utility down to one exe instead...
  4. lupidus

    Simple regex - finding a substring

    Solved my problem.. I was searching for a string in an array of strings so the following was needed: foreach $string (@output) { print "checking for '$success' in: $string"; if ($string =~ /$success/s) { print "ISDN connection to $ip ($desc) failed\n"; } }
  5. lupidus

    Simple regex - finding a substring

    Still doesn't work. Here's the revised code: while ( <INFILE> ) { # Process non-commentary lines only. if ( ! /^#/ ) { ++$i; chomp; ( $ip, $desc, $phn, $rtrname ) = split( ':' ); print "\nProbing: $ip; Desc: $desc\n"; @output =...
  6. lupidus

    Simple regex - finding a substring

    Anyone know why this regular expression search isn't working properly? I'm using use Net::Telnet::Cisco; to populate the @output variable if that matters.. #my $success = "Success rate is 0 percent"; my $success = "Success"; @output = $session->cmd(String => join (' ', 'ping', $ip)...
  7. lupidus

    Automating the monitoring of backup completion

    ...that will execute the following: select name, dbid, status, version from master.dbo.sysdatabases where name like N'%' -- get list of dbs select * from msdb.dbo.backupset where database_name='<db_name>' and type='D' order by backup_start_date By doing the above I believe I will get the...
  8. lupidus

    Creating appointments via c++

    Is there any way to programatically create an appointment in Exch 5.5 via c++? I have found tons of code/samples for doing this in Exchange 2000/2003, but nothing for 5.5. For example, in 2000 I am told to import the following type libraries in my code: #import "C:\Program Files\Common...
  9. lupidus

    GPMgmt.GPM (Group policy) and local computer policy

    Is it possible to use GPMgmt.GPM to make changes to the local computer policy or is this object limited to domain level policies? If it is possible to modify local policy using this method, does anyone have sample code? Here's sample code of what I've found. As you can see it explicitly...
  10. lupidus

    Can't save modified macro security setting except through Group Policy

    I'm unable to modify and save Access 2003 SP 2 macro security settings beyond medium/default except through Local Group Policy (via the office11.adm here http://office.microsoft.com/en-us/assistance/HA011513711033.aspx). The options aren't grayed out in Access - they just don't save (after...
  11. lupidus

    Prevent from displaying same choice when choosing from x # of dropdown

    ...a string of the SELECT objects selected indexes. A duplicate selection will be easily detectable. An example of a 'valid' indexString would be *2**1**3*. There are asterisks to both sides of each index as it is added. This allows for expandability to a number of SELECTs greater than 9...
  12. lupidus

    Prevent from displaying same choice when choosing from x # of dropdown

    I have a page where I generate x number of rows each with a dropdown box. Values for the dropdown list and default selected values will be chosen on initial page load for each dropdown. I want to write some javascript that will make it so there aren't any values that are redisplayed for any...
  13. lupidus

    Casting LPCWSTR to WCHAR

    ...to get it to a LPCWSTR. So far, I have : std::string input="encrypted_password_text.." std::string output; // decrypted password Encryptor * e = NULL; e = new Encryptor(); e->DecryptString(input, output); const char* lpPasswordTmp = output.c_str(); const WCHAR * lpPassword =...
  14. lupidus

    Deleting computers via WMI

    In the SMS scripting reference provided by Microsoft, I have found the following information about deleting objects in SMS via WMI: Get the instance of the required SMS object by using GetObject and supplying the path to the required object. For example, to get an instance of an advertisement...
  15. lupidus

    Dates in a recordset not displayed correctly

    The problem is that dates are showing up incorrectly when returned from a stored procedure: i.e. 12:00:00 AM (when using CDate conversion), or 12/30/1899 (via rs("columnname").Value) Here is the ASP code: If not rs.BOF and not rs.EOF Then Do Until rs.EOF %> <tr> <td><%=rs("OSVer")%></td>...
  16. lupidus

    Get timestamp attributes via LDAP

    Has anyone come across any issues with querying AD attributes such as: modifyTimeStamp, pwdLastSet, lockoutTime, and lastLogonTimestamp (big ints/intervals, and datetime values(?)). It seems to be the case that I need to do something different to obtain/display large integer values from the...
  17. lupidus

    CIM_DataFile and search specific drive

    ...drives). Set objWMIService = GetObject _ ("winmgmts:\\" & strComputer & "\root\cimv2") Set colFiles = objWMIService.ExecQuery _ ("Select * From CIM_DataFile Where extension = 'PST' AND Drive='c:'") For Each objFile in colFiles ' do stuff here.. Next...
  18. lupidus

    Server Error in '/' Application.

    On the webserver, ensure IIS has an application name set for the directory and the ASPNET account has read (and list?) permissions to the same folder.
  19. lupidus

    Dynamically adding controls to a panel

    Is it possible to dynamically (as a result of an OnClick event) add controls to a panel, etc. without doing a postback? I assume there's no way around an asp:button doing a postback, but there doesn't seem to be a whole lot of other options: Web controls with non-postback events: checkbox...
  20. lupidus

    Dynamically adding controls to a panel

    ...country from locations order by city"; type = "Locations"; PopulateSelect(sqlCommand, connString, type); sqlCommand = "select * from [Job Titles] order by job_title"; type = "Jobs"; PopulateSelect(sqlCommand, connString, type); type = "PhoneNumberTypes"...

Part and Inventory Search

Back
Top