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 );
Regarding the null terminating character being embedded within a source/custom resource (input string) , I'm having some difficulty getting fwrite to continue past embedded 0x00 values in my data...
Someone posted on another site:
It acted like it continued beyond the end of the array until it...
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...
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";
}
}
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)...
Hello all,
I just wanted to get some feedback regarding methods to automate the verification full backups are taking place daily for all databases on server(s).
I plan on writing a script that will execute the following:
select name, dbid, status, version from master.dbo.sysdatabases where...
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...
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...
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...
jemminger: Thanks,that solution is close to what I need , but it seems your code builds the subsequent select boxes on the fly. In my case, I will intially generate the page with all select boxes already populated, default selections selected, and items eliminated from the select boxes if the...
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...
It has been a few years since I've worked with C++, so I'm having some difficulty with these casts.
The goal of this code is to pass lpPassword into CreateProcessWithLogonW successfully. The CreateProcessWithLogonW function takes LPCWSTR lpPassword as a parameter. However, I'm dealing with...
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...
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>...
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...
I'm trying to use CIM_DataFile to search only the C drive for PST files. However, the code is running through all drives (plus network/mapped drives).
Set objWMIService = GetObject _
("winmgmts:\\" & strComputer & "\root\cimv2")
Set colFiles = objWMIService.ExecQuery _
("Select *...
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...
Hello all,
My goal is to have a "New Row" button which allows the user to add new rows for input to a table. I have set the OnClick event for a button to call a c# function called NewRow. NewRow uses controls.add to add LiteralControl , DropDownList, and TextBoxes to the Panel.
The button...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.