Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x

System Programming

40K

Solutions

19K

Contributors

Kernel and system programming is the process of creating the software necessary for a computer or device to function and operate other programs. Some operating systems (such as Microsoft Windows) are proprietary, but others, such as the various Linux distributions, are open source.

Share tech news, updates, or what's on your mind.

Sign up to Post

Hi Experts,

I have written a program that reads the network interfaces to retrieve the MAC addresses for the network cards/interfaces in the computer.

The program sets up a http server to run locally on every machine, listening on a port for the API calls. For each request I'm starting a new thread, and in that thread I make a call to retrieve this information.

However, sometimes the program crashes entirely (not just the thread serving the request, but the entire program itself), without any logs or exceptions.

I'm not too sure what the cause is, but I suspect it may have to do with the NetworkInterface.GetAllNetworkInterfaces() call, as my logs stop there everytime it randomly crashes. Usually, even if a COMException occurs (due to some native DLL I'm using), the server would still be up and running, but in this case, the server closes entirely.

I have also tried this on my colleague's computer; it seems to be fine for him, but mine crashes randomly, perhaps once every 100 requests?

My question is, is there a known issue with the NetworkInterface.GetAllNetworkInterfaces() call? If not, is there a way for me to properly debug and find the cause of this issue?


Best Regards,
Zack
0
Survive A High-Traffic Event with Percona
LVL 3
Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

Hi experts, i want to change PHP to POWERBUILDER, any help please!
below the php script :

========encrypt===============
function mc_encrypt($data, $key)
{
/// make binary representasion of $key
$key = hex2bin($key);

/// check key length, must be 256 bit or 32 bytes
if (mb_strlen($key, "8bit") !== 32) {
throw new Exception("Needs a 256-bit key!"); }

// create initialization vector
$iv_size = openssl_cipher_iv_length("aes-256-cbc");
$iv = openssl_random_pseudo_bytes($iv_size);

/// encrypt
$encrypted = openssl_encrypt($data, "aes-256-cbc", $key, OPENSSL_RAW_DATA, $iv );

/// create signature, against padding oracle attacks
$signature = mb_substr(hash_hmac("sha256", $encrypted,  $key,   true),0,10,"8bit");

/// combine all, encode, and format
$encoded = chunk_split(base64_encode($signature.$iv.$encrypted));

return $encoded;
}

========decrypt===============
function mc_decrypt($str, $key)
{

/// make binary representation of $key
$key = hex2bin($key);

/// check key length, must be 256 bit or 32 bytes if (mb_strlen($key, "8bit") !== 32) {
throw new Exception("Needs a 256-bit key!"); }

/// calculate iv size
$iv_size = openssl_cipher_iv_length("aes-256-cbc");

/// breakdown parts
$decoded = base64_decode($str);
$signature = mb_substr($decoded,0,10,"8bit");
$iv = mb_substr($decoded,10,$iv_size,"8bit");
$encrypted = mb_substr($decoded,$iv_size+10,NULL,"8bit");

/// check signature, against padding oracle attack
0
Hello everyone.

I've seen that what I'm trying to do which is monitoring the file IO require the use of Window File System Filter driver and I've also looked into it but was a bit hard to understands especially as I'm not a C++ developer. What I want to achieve is to be able to trap file copy, creation, as well as file sources and destinations, lets say I'm copying a file within my computer I want to get the source path of the file as well as destination path of the file and also the file name as well and if possible with the application that is sending the file.

I saw that this can also inform you if there is file access(opening of file, reading of file) this is very much important to me to also get it if possible while the request of file open is created. I wan to trap this and if the file is one of my file then I want to first work on the requested file first (decrypt).

Thank you.
0
What I need is to return a single partition ID by supplying a LABEL so I can use it in a bash script.

For instance partid = somecommand DATA-BU would store the partition is in a variable.  

What sayeth the group ?

Jay
 
I have seen ls -l /dev/disk/by-label will show me ALL LABELS > Partitions as shown in this picture, however I only need a single one and I need it in a variable form.

label-info.png
0
hi,

http://codingbat.com/prob/p136950

for above challenge
Map-1 > mapAB4
prev  |  next  |  chance

Modify and return the given map as follows: if the keys "a" and "b" have values that have different lengths, then set "c" to have the longer value. If the values exist and have the same length, change them both to the empty string in the map.

mapAB4({"a": "aaa", "b": "bb", "c": "cake"}) → {"a": "aaa", "b": "bb", "c": "aaa"}
mapAB4({"a": "aa", "b": "bbb", "c": "cake"}) → {"a": "aa", "b": "bbb", "c": "bbb"}
mapAB4({"a": "aa", "b": "bbb"}) → {"a": "aa", "b": "bbb", "c": "bbb"}

what are input parameters for the method.

what is the return for it?


"a": "aaa", "b": "bb", "c": "cake"//is these are bunch of string values pretending to be key and value for a map??

please advise on how to understand and approach this challenge
0
I installed C++ builder 6.0 on windows 10.
when I reopen a project , my working directory don't change to new project path and my new forms create on the directory that last time I used "FILE->Open Project" method.
if every body knows how can say to it change to the project path after reopen .
-- thanks reza
0
Hi,
How to adjust to list below, to have also one picture file included, that is retrieved from database?

            using (SqlConnection sqlConn = new SqlConnection(ConfigurationManager.ConnectionStrings["Mssqlconn3"].ConnectionString))
            {
                using (SqlCommand sqlCmd = new SqlCommand("SELECT house_name, address1, address2, price, price_curr FROM house_tab", sqlConn))
                {
                    sqlConn.Open();
                    sqlCmd.CommandType = CommandType.Text;
                    SqlDataAdapter sqlAd = new SqlDataAdapter(sqlCmd);
                    DataTable sqlDt = new DataTable();
                    sqlAd.Fill(sqlDt);
                    sqlConn.Close();
                    if (null != sqlDt)
                    {
                        houseList = sqlDt
                                        .AsEnumerable()
                                        .Select(dataRow => new HouseData
                                        {
                                            house_name = dataRow.Field<string>("house_name"),
                                            address1 = dataRow.Field<string>("address1"),
                                            address2 = dataRow.Field<string>("address2"),
                                            price = dataRow.Field<decimal>("price"),
                                            price_curr = dataRow.Field<string>("price_curr"),
                                        })
         

Open in new window

0
I have a problem with my mouse. When i move it to the right it goes down, when i move it to the left it goes up, when i move it up it goes to the right, when i move it down it goes to the left.

i really want to use my mouse can somebody help me.

Im using Armageddon Aquila-X5
0
Hi,
Is there an example to create list (like what we can get by Gridview) like the following, having Picture file loaded from database?
                <dl id="list_D03_03" onmouseout="mouseOutStyle(this)" onmouseover="mouseOverStyle(this)" class="list rel">
                    <dt class="img rel floatl">
                        <a href="/chushou/3_260353623.htm"  target="_blank">
                            <img width="180" height="135" src="http://img.soufun.com/secondhouse/image/esfnew/search2014/images/loading160_120.gif" src2="http://img11.soufunimg.com/viewimage/agents/2017_05/13/M06/04/17/ChCE4FkWpWiIPlJFAACL93NuA_0AAcAegG1kQ8AAIwP526/220x165c.jpg" onerror="imgiserror(this,'http://img11.soufunimg.com/agents/2017_05/13/M06/04/17/ChCE4FkWpWiIPlJFAACL93NuA_0AAcAegG1kQ8AAIwP526.jpg')" /></a>
                        <p class="txtBg"></p>
                        <p class="txt"><span class="iconImg">10</span></p>
                    </dt>
                    <dd class="info rel floatr">
                        <p class="title"><a href="/chushou/3_260353623.htm"  target="_blank" title="下角</a> 
                            
                        </p>
                        <p class="mt12">
                            2
                            
                            <span class="line">|</span>中
                            <span class='line'>|</span>西
                            <span class='line'>|</span>建
                        </p>
                        

Open in new window

0
I referred to your post :
https://www.experts-exchange.com/questions/20930458/CreateProcess-for-Currently-Logged-On-User-from-Service-running-System-Account.html
and started building i got error in calling of
HANDLE GetCurrentUserToken()
{
      PHANDLE currentToken = 0;
      HANDLE primaryToken = 0;
      DWORD processID = GetExplorerProcessId();
      HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, TRUE, processID);
      if (!hProcess)
      {
            LogMessage(ErrorExit(TEXT("OpenProcess Error")));
      }
      if (!OpenProcess(PROCESS_ALL_ACCESS, TRUE, processID))
      {
            LogMessage(ErrorExit(TEXT("OpenProcess Error")));
      }
      if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ALL_ACCESS, currentToken))
      {
            LogMessage(ErrorExit(TEXT("OpenProcessToken Error")));
      }

      if(!DuplicateTokenEx(currentToken,TOKEN_ASSIGN_PRIMARY | TOKEN_ALL_ACCESS,0, SecurityImpersonation, TokenPrimary, &primaryToken))
      {
            LogMessage(ErrorExit(TEXT("DuplicateTokenEx Error")));
      }

      return primaryToken;
}


Kindly Help me out
0
Will your db performance match your db growth?
LVL 3
Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Hi all,
We are currently in the process of implementing a new financial system which needs to interfaces with several other business systems to process payments. i.e. the source system interfaces with new target financial system to send instruction on people/businesses that need to be paid.  I want to make sure that the details regarding these interfaces are suitably documented.
What I am struggling with in this regard is what we should be documenting.  Some research highlights different expectations and requirements e.g. interface strategies, interface designs, interface control documents, interface specification etc.

My question is what documents should we be creating for the new system as a whole, what documents we should be creating for each specific interface and what kind of information should be included in each?

Some thoughts I have had that we should be recording are:
•      Mapping tables
•      Validations
•      Ownership & Responsibilities
•      Security requirements
•      Data fields being interfaced
•      Interface method
•      Timings
•      How the interface will be processed
•      Reconciliations

TIA
0
Hello guys im learning visual basic 6.0 and as an assignment i was told to come up with a code that backs up and restores my database. So im asking for your assistance, not with the actual code but the steps that i should take so as come up with it myself. Thanks in advance.
0
Anyone know a program or Dialing system for making interviews over phone.
Like a system or program that you can make interview questions flows easy. Then save the statistics for later review or send them to a partner.  
Either you have a interview system than a Dialer separated they don't need to be combine into one.
0
Mohon bantuan nya
0
I able to disable the menu items in Pdf files . But i couldn't disable the sub menu item in Pdf files through Autoit
0
What is counting semaphore?
0
hi all, please i just installed this panasonic TDA 100 ip intercom telephone system. everything is working fine but i dont know how to programm the call assignment feature, unlike the  1232 where you can do the programming with the operator console. please is there a way to programm this(TDA100) intercom with operator console.
thank you all
0
Write a TSR program that will clear all the contents of the screen and write your ( SYSTEM PROGRAMMING) anywhere on screen of the video text memory available at 0xB8000000 whenever interrupt 8 is invoked.  Also, note that the fore color of SYSTEM PROGRAMMING should be white and back color should be blue.
0
Hello, I need help .. I would like to create Flash Drive (UEFI), which when run (bootable usb) clears all disks (except the USB disk with automated diskpart). (Diskpart -> select disk 1/2/3 and clean all). It would somehow create? Also, if I have the best flashdrive after launch could pull (stored in RAM) .. For example, .bat or .cmd format :) I need this flashdrive to simplify my work. :) Please help me with the creation of the USB flashdrive very please ..
0
Industry Leaders: We Want Your Opinion!
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

The RMC return code is 0. The OS return code is 1140.




Edit: Topic changed from Visual Basic Classic to Unix OS
Graham Skan
0
Hi I would like to retrieve the data from SCOM API in order to make another Aggregated data set for other use. I have search around for books, video , forum and even seek Microsoft for help but Microsoft didn't come back to me yet. but other resource was just very few available discussing about the SCOM SDK.

Can anyone provide some help on that when I using powershell or if better using C# API to retrieve data.

Regards,
Zteffer
0
I am trying to learn and then teach ARM processor and the assembly language. Can anyone point me to the correct direction to start with?  In particular I would like to know the best free simulators for ARM systems.
Thanks
0
Hello expert,
I would like setup netmap on ubuntu release 15. Thanks.
s.s.
0
How to append sysdate to file name in UNIX shell scripting  and remove the file .

Eg: file_name.CSV

Requirement: file_name_sysdate.CSV
File_name_yyyy-mm-dd.CSV
0
Hi,  we have a mitel 5000 system in one of our facilities.  I am trying to come up with a configurable way that we can make an extension ring though the paging system because it needs to let people on the plant floor know someone is calling.  I know I could open up a phone and solder on some wires to the speaker and attach it through the paging system... but before I plug in my soldering iron, I thought I would ask you find folks if you know of another way.

Thanks in advance!
0

System Programming

40K

Solutions

19K

Contributors

Kernel and system programming is the process of creating the software necessary for a computer or device to function and operate other programs. Some operating systems (such as Microsoft Windows) are proprietary, but others, such as the various Linux distributions, are open source.