Success is possible, though, if you make advance preparations, like being certain you've traced your family back one generation at a time until you've identified your original immigrant ancestor and the precise location of his or her ancestral home. You must also do homework. You need to learn exactly which records you can get for that country and acquire basic information about its history and changing boundaries. Finally, keep an open mind about the spelling of your surname. On documents involving three of her children, my great-grandmother alternately appears as Anna M. Gary, Anna McGarry and Anna McGarrity.
Few universals apply to researching foreign records, which is why the hunt is so difficult.
Generally, just about every country preserved its religious records. They're your best bet. Most countries conducted census counts but may not have started until 1900. Civil registration became mandatory at some point, but dates vary. So do privacy laws.