Displaying Open File Dialog using WinApi

This article describes sample code that displays an Open dialog box so that a user can choose the directory, and file name of a to open. The process can be done by keyboard or mouse. The sample code first initializes an OPENFILENAME structure, and then calls the GetOpenFileName function to display the dialog box.

In this example, the lpstrFilter member is a pointer to a buffer that specifies two file name filters that the user can select to limit the file names that are displayed. The buffer contains a double-null terminated array of strings in which each pair of strings specifies a filter. The nFilterIndex member specifies that the first pattern is used when the dialog box is created.

This example sets the OFN_PATHMUSTEXIST and OFN_FILEMUSTEXIST flags in the Flags member. These flags cause the dialog box to verify, before returning, that the path and file name specified by the user actually exist.

The GetOpenFileName function returns TRUE if the user clicks the OK button and the specified path and file name exist. In this case, the buffer pointed to by the lpstrFile member contains the path and file name. The sample code uses this information in a call to the function to open the file.

Add a comment
Read more: Displaying Open File Dialog using WinApi

What blockchain is?

blockchain developmentYou may have already heard the term "blockchain", but maybe did not pay much attention to it, considering it a buzzword or technical jargon. But we believe that develeopment of blockchain technology soulutuions is a breakthrough with very large consequences, which will affect not only the sphere of finance, but also many other sectors. In this article we will tell you what a blockchain is, in simple words.

Block (a chain of blocks) is a distributed database, in which storage devices are not connected to a shared server. This database stores an ever-growing list of ordered records, called blocks. Each block contains a timestamp and a link to the previous block. The use of encryption ensures that users can only change parts of the chain of blocks that they "own" in the sense that they have private keys, without which writing to the file is impossible. In addition, encryption provides synchronization of copies of the distributed chain of blocks for all users.

Security in blockchain technology is provided through a decentralized server that places timestamps and peer-to-peer network connections. As a result, a decentralized database is formed, which is managed autonomously, without a single center. This makes the blockchain very convenient for registering events (for example, making medical records) and data operations, identity management and authentication of the source.

How does blockchain technology work?

Add a comment
Read more: What blockchain is?

Electronics Manufacturing Services

poor quality pcbAre you tired of poor-quality assembly?

Are you tired of fighting manufacturing defects?
Do returns kill your business and your reputation?


Poorly assembled electronic part of the product and poorly tested before shipping to the customer result of a breakdown of the device during the warranty period and a huge bill for the replacement of a non-working device with another one, which can also fail. These losses are usually much greater than all your earnings on the device! At least they can be counted… However, how to measure the loss of reputation of your company for customers? How to get the customer to believe in your reliability again? With these questions, our customers come to us first.


Many companies trust us to take care of the electronic manufacturing part of their products. Why? Because it is better to entrust the professionals in such sophisticated field as electronics design.

testingWe begin by conducting an expert evaluation of your product, to identify weaknesses, if necessary, agree with you the changes that will allow the product to be better. We analyze the components and suppliers, because only high-quality components and reliable delivery process will allow you to say that your product is the best on the market. We have huge experience the field of contract manufacturing - and if you want, we will recommend you reliable suppliers, or take this care of this for you.

The process of manufacturing itself requires control that is even more careful. No batch will go into production until we perform a random test of the purchased components. We select components from different parts of the lot bought for production, we collect a small test lot - and we carry out a comprehensive check of the collected prototypes. Only after receiving the approval of our engineers, we start the production of a batch. If a defect is found, it will be corrected before the whole batch is assembled.

During the preparation of production, our engineers prepare test benches, which will allow to check hundreds of devices at the same time. We conduct an engineering test of each device from the lot before sending it to the customer. The engineering test includes testing of all operating modes of every single device. All sensitive characteristics are tested. The operation in declared ranges of input voltage, temperature conditions, working characteristics are controlled. The working test lasts no less than an hour for each device, after which the devices are visually inspected for defects.

Poor packaging and delivery is a way to damage even an admittedly working batch of devices. We carry out professional packaging of products, and cooperate only with reliable delivery services. Large quantities of shipments allow us to have the maximum discount on the delivery of products.

And the last thing after reading this - you will have a though – “I can not afford it”.




How? Because our main office is in Europe, where the salaries of highly qualified affordableengineers are lower than in the US. The maintenance of the factory and equipment is also cheaper. These benefits allow us to offer high-quality professional electronics manufacturing services at the price of the usual irresponsible assembly! At the same time, you save a huge amount of money on refunds. And, you earn on increasing your reputation in the eyes of your customers!

Contact us! We are waiting for you, in the friendly family of our satisfied customers!

{jcomments off}


Add a comment

Using C# Mutexes for interprocess synchronization

Mutexes are used in multithreaded (multiprocess) environment for organizing a mutually exclusive access to some shared resource. While usually not required for simple applications, these syncronization primitives are crucial once you advance to mutli-threaded world. Consider you have some resource, which can only be accessed from a single process or thread for consistency. Say, you have a connection to some remote server that can process only one operation at a time. Multiple requests are dropped. But you need to write two programs that do some data processing and query the server periodically. Of course, you can run them in chain one after another. Run first program, wait until it finishes, then run second program. But what if you want your programs to do background work simultaneously and only block on server requests? This will be much more effective considering you have enough CPU power at your server. There are many other similar examples like sharing the same serial port when communicating with some peripheral, etc. 

In this example we will discuss how to create and correctly use a named mutex object.

Add a comment
Read more: Using C# Mutexes for interprocess synchronization

Change the Remote Desktop Connection port on Windows Server

This manual apply to Windows Server 2012, 2008 R2, 2008, 2003


The latest attacks of ransomware viruses exploit poorly protected Remote Desktop access to connect to Windows servers, then crack weak passwords and encrypt sensitive data. Hundreds of hackers continously scan the Internet to find poorly protected servers. Once you install Windows Server, it gets to the scope of hackers rather quickly - in a couple of weeks of so.


Of course, the first countermeasure to avoid accidental hacker attack is to use secure password. Never use simple or easily guessed passwords, use at least 20 character passwords with different letter casing, numbers, special symbols.


One additional countermeasure to fight automated hacker attacks is to move RDP port from default 3389 to different number, which is known only to you. This will get your server off automated port scann alorithms used by hackers and viruses. 


As we said before, default Windows servers' Remote Desktop is listening on TCP port 3389. You can change the port to different number in range 1024-65535. 

Do not use lower port number since it is reserved by system. 


IMPORTANT: Make sure that remote access to your server through the new port is authorized in your Windows firewall before executing the next steps. 

Add a comment
Read more: Change the Remote Desktop Connection port on Windows Server

How to get the current executable's path in C#

Sometimes you may want to get the current executable (i.e. the executable your program is currently running in) path, This is needed to access some settings file, database file or resources file residing in the same directory as executable. 

There are several options to find the current executable path. But I found the one working both for console applications and for Windows Forms Applications:

Add a comment
Read more: How to get the current executable's path in C#

How to download entire web site via FTP recursively using wget

Sometimes you need to download an enire website via FTP to your harddrive. This is needed if you want to make a backup or to move your site from one hosting provider to another. Of course you could use some GUI client like FileZilla, Midnight Commander or Gnome Commander. But what if you want to wrap the download process into shell script or maybe conduct the download as backgroud task to download one server's contents from another?

Add a comment
Read more: How to download entire web site via FTP recursively using wget

How to unzip file on Ubuntu Linux

When downloading files from Internet you will often get an archive. The purpose of archive among many is to reduce download size, reduce number of files being downloaded to just one, provide basic integrity check on the subject files and sometimes provide additional security with the use of passwords. There are many archive types most commonly used of them are .zip, .rar. .7z, .tar.gz. Today we are going to speak about .zip archives. On Windows there exist GUI archivers like WinRAR or WinZip which are able to deal with most of the common archive types.

But what can you do whent you just downloaded zip file on Ubuntu Linux and have just a console? This can happen when you have installed Ubuntu Server or working from a Terminal Program.

Add a comment
Read more: How to unzip file on Ubuntu Linux

Tips on starting online business In California

A State of California has fast growing online business market. If you are interested on starting an online e-commerce business in California, you may wish to consider a few things that you may need to review from a practical and legal perspective.


Vibrant Market

Do you want to know whether e-commerce is a good niche to drive business? Absolutely. The whole world is constantly converting to buying goods and services online. Lately we used to spend hours of browsing in bookstores. Now many people buy e-books online and haven’t been to a bookstore for many years! Since it is so easy to place order online, the future for online ecommerce sites seems to be brilliant.

But the described supposingly bright future of e-commerce doesn’t mean you can just start with simple site selling anything. Let's admit it, not everything is successfully selling online. As you would do traditional way, it's worth to take the time to develop a business plan.

Add a comment
Read more: Tips on starting online business In California

Ecommerce market share in the United Kingdom worth €153 billion

Ecommerce in the United Kingdom worth 153 billion euros or 133 billion pounds during year 2016. This means that there was 16 percent growth of the industry compared to previous, 2015 year. For comparison, when consumers spent 132 billion euros online with English retailers. This growth was partly due to an increased popularity of mobile mcommerce.


Ecommerce growth 2016

Add a comment
Read more: Ecommerce market share in the United Kingdom worth €153 billion